diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-23 02:49:41 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-02-23 02:49:41 +0000 |
commit | b83ed6d1bd710c0f3397dafbba3b96e1311bcc6a (patch) | |
tree | f9d82b899d00b2771d2a9fdfd7832f0d61d9457a /string.c | |
parent | 3600c7ef8f00a06e63f312709d4bd01c302ca4f4 (diff) | |
download | ruby-b83ed6d1bd710c0f3397dafbba3b96e1311bcc6a.tar.gz |
* parse.y, compile.c, gc.c, insns.def, intern.h, iseq.c, node.h,
object.c, string.c, variable.c, vm_macro.def: revert private
instance variable feature, which is postponed until next major
release.
* marshal.c: TYPE_SYMBOL2 removed; MARSHAL_MINOR reverted back to
8th version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 28 |
1 files changed, 0 insertions, 28 deletions
@@ -4685,9 +4685,6 @@ sym_inspect(VALUE sym) VALUE str, klass = Qundef; ID id = SYM2ID(sym); - if (rb_is_instance2_id(id)) { - id = rb_decompose_ivar2(id, &klass); - } sym = rb_id2str(id); str = rb_str_new(0, RSTRING_LEN(sym)+1); RSTRING_PTR(str)[0] = ':'; @@ -4721,9 +4718,6 @@ rb_sym_to_s(VALUE sym) { ID id = SYM2ID(sym); - if (rb_is_instance2_id(id)) { - id = rb_decompose_ivar2(id, 0); - } return str_new3(rb_cString, rb_id2str(id)); } @@ -4876,27 +4870,6 @@ rb_to_id(VALUE name) return id; } -static VALUE -sym_div(VALUE sym, VALUE klass) -{ - ID id = SYM2ID(sym); - - if (!rb_is_instance2_id(id)) { - rb_raise(rb_eArgError, "symbol %s should be local instance variable", - rb_id2name(id)); - } - switch (TYPE(klass)) { - case T_CLASS: - case T_MODULE: - break; - default: - rb_check_type(klass, T_CLASS); - break; - } - id = rb_compose_ivar2(id, klass); - return ID2SYM(id); -} - /* * A <code>String</code> object holds and manipulates an arbitrary sequence of * bytes, typically representing characters. String objects may be created @@ -5037,7 +5010,6 @@ Init_String(void) 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_method(rb_cSymbol, "/", sym_div, 1); rb_define_method(rb_cSymbol, "==", sym_equal, 1); rb_define_method(rb_cSymbol, "to_i", sym_to_i, 0); rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0); |