Actions
Bug #7559
closedWrong line number with method call syntax
Description
以下のような場合に表示される行数がおかしくなります。
def foo(*args)
p caller[0][/\d+/].to_i #=> expected 4 but 8
end
foo "a
b
c
d
e"
def bar(a, b, line)
p a
p line #=> expected 14 but 19
end
def baz
bar LINE, <<eom, LINE
a
b
c
d
eom
end
baz
Updated by nobu (Nobuyoshi Nakada) about 12 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r38378.
Yui, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
parse.y: fix line number
-
parse.y (parser_params): parser_tokline to track the line number at
which token started. [ruby-dev:46737] [Bug #7559] -
parse.y (fcall): operation with starting line number.
-
parse.y (command, primary, method_call): point method name line.
-
parse.y (gettable_gen): return token line for LINE.
Actions
Like0
Like0