Project

General

Profile

Actions

Bug #1769

closed

eval with binding, without location

Added by yugui (Yuki Sonoda) over 15 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2dev (2009-07-13 trunk 24067) [i386-darwin9.7.0]
Backport:
[ruby-dev:38767]

Description

=begin
evalの第3, 4引数を省略した際にbindingが持っているfile, lineが伝播しなく
なっています。これは意図したことでしょうか。
irbのバックトレースがこれのためにちょっと不親切になっています。

% cat test.rb
b = binding
p eval("FILE", b)

b = eval('binding', TOPLEVEL_BINDING, FILE, LINE)
p eval("FILE", b)

% ruby18 -v test.rb
ruby 1.8.7 (2009-04-08 patchlevel 160) [i686-darwin9]
"test.rb"
"test.rb"

% ruby-trunk -v test.rb
ruby 1.9.2dev (2009-07-13 trunk 24067) [i386-darwin9.7.0]
"(eval)"
"(eval)"

--
Yugui
http://yugui.jp
私は私をDumpする
=end


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #2782: Binding#eval not completely indicative of its bindingClosedmame (Yusuke Endoh)02/23/2010Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0