[macruby-changes] [MacRuby/MacRuby] ec6867: rewrite 351ebd7 and 954a8c7 because they cause cra...
noreply at github.com
noreply at github.com
Wed Mar 30 16:31:14 PDT 2011
Branch: refs/heads/master
Home: https://github.com/MacRuby/MacRuby
Commit: ec6867998331c873e79ce758a1fa701894d17a01
https://github.com/MacRuby/MacRuby/commit/ec6867998331c873e79ce758a1fa701894d17a01
Author: Watson <watson1978 at gmail.com>
Date: 2011-03-30 (Wed, 30 Mar 2011)
Changed paths:
M vm.cpp
M vm_eval.c
Log Message:
-----------
rewrite 351ebd7 and 954a8c7 because they cause crash when refer to class variable within instance_{eval, exec}'s block.
Test Script:
{{{
require 'test/unit/assertions.rb'
include Test::Unit::Assertions
@@a = 4
assert_equal(4, 1.instance_eval { @@a } )
assert_equal(4, 1.instance_exec { @@a } )
assert_raise(TypeError){ 1.instance_eval { def foo; end } }
assert_raise(TypeError){ 1.instance_eval { alias :foo :to_s} }
assert_raise(TypeError){ 1.instance_exec { def foo; end } }
assert_raise(TypeError){ 1.instance_exec { alias :foo :to_s} }
puts :ok
}}}
More information about the macruby-changes
mailing list