* variable.c (rb_mod_remove_const): fix segv caused by r38558.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3e81553a1e
commit
109d71ac71
@ -1,3 +1,7 @@
|
|||||||
|
Thu Dec 27 21:56:56 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* variable.c (rb_mod_remove_const): fix segv caused by r38558.
|
||||||
|
|
||||||
Tue Dec 28 01:13:48 2012 James Edward Gray II <james@graysoftinc.com>
|
Tue Dec 28 01:13:48 2012 James Edward Gray II <james@graysoftinc.com>
|
||||||
|
|
||||||
* lib/csv.rb: Added more Hash methods to CSV::Row.
|
* lib/csv.rb: Added more Hash methods to CSV::Row.
|
||||||
|
@ -1591,4 +1591,9 @@ class TestModule < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
assert_equal("", stderr)
|
assert_equal("", stderr)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_remove_const
|
||||||
|
m = Module.new
|
||||||
|
assert_raise(NameError){ m.instance_eval { remove_const(:__FOO__) } }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -1919,7 +1919,7 @@ rb_mod_remove_const(VALUE mod, VALUE name)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rb_name_error_str(name, "`%"PRIsVALUE"' is not allowed as a constant name",
|
rb_name_error_str(name, "`%"PRIsVALUE"' is not allowed as a constant name",
|
||||||
QUOTE_ID(name));
|
QUOTE(name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!rb_is_const_id(id)) {
|
if (!rb_is_const_id(id)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user