Project

General

Profile

Actions

Bug #7559

closed

Wrong line number with method call syntax

Added by naruse (Yui NARUSE) over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 2.0.0dev (2012-12-13 trunk 38361) [x86_64-freebsd9.0]
Backport:
[ruby-dev:46737]

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

Actions

Also available in: Atom PDF