[ruby-dev:48699] [ruby-trunk - Bug #10411] [Closed] Ripper.sexp("foo\n .bar") extract a wrong method name " .bar"

From: nobu@...
Date: 2014-10-24 13:49:54 UTC
List: ruby-dev #48699
Issue #10411 has been updated by Nobuyoshi Nakada.

Status changed from Open to Closed
% Done changed from 0 to 100

Applied in changeset r48126.

----------
parse.y: fix fluent interface identifier

* parse.y (parser_yylex): dispatch newline and space at fluent
  interface, so that the following identifier does not include the
  space.  [ruby-dev:48684] [Bug #10411]

----------------------------------------
Bug #10411: Ripper.sexp("foo\n         .bar") extract a wrong method name "=
         .bar"
https://bugs.ruby-lang.org/issues/10411#change-49630

* Author: Akira Tanaka
* Status: Closed
* Priority: Normal
* Assignee:=20
* Category:=20
* Target version:=20
* ruby -v: ruby 2.2.0dev (2014-10-22 trunk 48083) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
=E4=BB=A5=E4=B8=8B=E3=81=AE=E3=82=88=E3=81=86=E3=81=AB=E3=80=81ripper =E3=
=81=8C=E3=80=81=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E5=90=8D=E3=81=A8=E3=81=
=97=E3=81=A6 "         .bar" =E3=81=AA=E3=81=A9=E3=81=A8=E3=81=84=E3=81=A3=
=E3=81=9F
=E7=A9=BA=E7=99=BD=E3=82=84=E3=83=94=E3=83=AA=E3=82=AA=E3=83=89=E3=81=AE=E5=
=85=A5=E3=81=A3=E3=81=9F=E6=96=87=E5=AD=97=E5=88=97=E3=82=92=E5=8F=96=E3=82=
=8A=E5=87=BA=E3=81=97=E3=81=A6=E3=81=8F=E3=82=8B=E3=81=93=E3=81=A8=E3=81=8C=
=E3=81=82=E3=82=8A=E3=81=BE=E3=81=99=E3=80=82

```
% ./ruby -v -rripper -e 'p Ripper.sexp("foo\n         .bar")'
ruby 2.2.0dev (2014-10-22 trunk 48083) [x86_64-linux]
[:program, [[:call, [:vcall, [:@ident, "foo", [1, 0]]], :".", [:@ident, "  =
       .bar", [2, 0]]]]]
```

=E6=94=B9=E8=A1=8C=E3=82=92=E5=85=A5=E3=82=8C=E3=81=AA=E3=81=91=E3=82=8C=E3=
=81=B0=E3=80=81"bar" =E3=81=A8=E3=81=84=E3=81=86=E6=9C=9F=E5=BE=85=E3=81=99=
=E3=82=8B=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E5=90=8D=E3=81=8C=E5=8F=96=E3=
=82=8A=E5=87=BA=E3=81=95=E3=82=8C=E3=81=BE=E3=81=99=E3=80=82

```
% ./ruby -rripper -e 'p Ripper.sexp("foo         .bar")'=20=20=20
[:program, [[:call, [:vcall, [:@ident, "foo", [1, 0]]], :".", [:@ident, "ba=
r", [1, 13]]]]]
```





--=20
https://bugs.ruby-lang.org/

In This Thread

Prev Next