diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-02 15:20:24 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-02 15:20:24 +0000 |
commit | 10a0dea1f5fddd26d2b29f41fa190049eec95550 (patch) | |
tree | b535d0fa5be1cd7445a7374bca7a0922abcc7b26 /string.c | |
parent | d064c0bf13b47356757e4dc9f678a2f0ff84e624 (diff) | |
download | ruby-10a0dea1f5fddd26d2b29f41fa190049eec95550.tar.gz |
* string.c (Init_String): undef Symbol#new.
* struct.c (rb_struct_s_def): wrong symbol detection.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4407,7 +4407,6 @@ rb_str_setter(VALUE val, ID id, VALUE *var) /* * call-seq: - * Symbol.new(str) => new_sym * Symbol.intern(str) => new_sym * * Returns a new symbol corresponding to <i>str</i>. @@ -4699,9 +4698,10 @@ Init_String(void) rb_define_variable("$-F", &rb_fs); rb_cSymbol = rb_define_class("Symbol", rb_cString); + rb_undef_alloc_func(rb_cSymbol); + rb_undef_method(CLASS_OF(rb_cSymbol), "new"); rb_define_singleton_method(rb_cSymbol, "all_symbols", rb_sym_all_symbols, 0); /* in parse.y */ rb_define_singleton_method(rb_cSymbol, "intern", rb_sym_s_intern, 1); - rb_define_singleton_method(rb_cSymbol, "new", rb_sym_s_intern, 1); rb_define_method(rb_cSymbol, "to_i", sym_to_i, 0); rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0); |