e$B1sF#$H?=$7$^$9!#e(B
Binding e$B$KFC0[%a%=%C%I$rDj5A$9$k$He(B eval e$B$G$-$J$/$J$j$^$9$,!"e(B
e$B0U?^E*$G$7$g$&$+!#e(B
$ ./ruby -ve ‘x = 1; b = binding; def b.foo; end; p b.eval(“x”)’
ruby 1.9.0 (2008-02-13 revision 15457) [i686-linux]
-e:1:in eval': wrong argument type Binding (expected Binding) (TypeError) from -e:1:in
’
e$B$=$s$J$3$H$7$M!<$h$H$$$&%D%C%3%_$O$41sN82<$5$$e(B
Index: eval.c
— eval.c (revision 15454)
+++ eval.c (working copy)
@@ -1700,7 +1700,7 @@
volatile VALUE iseqval;
if (scope != Qnil) {
-
if (CLASS_OF(scope) == rb_cBinding) {
-
GetBindingPtr(scope, bind);if (rb_obj_is_kind_of(scope, rb_cBinding)) {
envval = bind->env;
stored_cref_stack = bind->cref_stack;