Issue #7559 has been reported by naruse (Yui NARUSE). ---------------------------------------- Bug #7559: Wrong line number with method call syntax https://bugs.ruby-lang.org/issues/7559 Author: naruse (Yui NARUSE) Status: Assigned Priority: Normal Assignee: nobu (Nobuyoshi Nakada) 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
on 2012-12-13 20:07
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.