[ruby-trunk - Bug #7559][Assigned] Wrong line number with method call syntax

Issue #7559 has been reported by naruse (Yui NARUSE).


Bug #7559: Wrong line number with method call syntax

Author: naruse (Yui NARUSE)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi N.)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-12-13 trunk 38361) [x86_64-freebsd9.0]

以下のような場合に表示される行数がおかしくなります。

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