summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-02 04:31:23 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-02 04:31:23 +0000
commit75eee0bafdaa5adf30dc87cbb01b5f2e24ac8a01 (patch)
tree520cc63c5cccf0d97fd78bf8dbe62558ecff7f70 /object.c
parent34a31235c9eeaa9c1d1bcacd7470d2b37429a19f (diff)
* ext/socket/socket.c (unix_addr): getsockname(2) may result len = 0.
* ext/socket/socket.c (unix_peeraddr): getpeername(2) may result len = 0. * string.c (rb_str_subpat_set): support function for new argument pattern String#[re,offset] = val. [new] * eval.c (POP_BLOCK): rb_gc_force_recycle() was called too much. Should not be called if SCOPE_DONT_RECYCLE is set. * string.c (rb_str_aref_m): new argument pattern String#[re,offset]. [new] * string.c (rb_str_substr): should return an instance of receiver's class. * string.c (rb_str_succ): ditto. * array.c (rb_ary_subseq): ditto. * array.c (rb_ary_initialize): Array.new([1,2,3]) => [1,2,3]. [new] * string.c (rb_str_reverse): should return an instance of receiver's class. * string.c (rb_str_times): ditto. * array.c (rb_ary_times): ditto * string.c (str_gsub): ditto. * string.c (rb_str_ljust): ditto. * string.c (rb_str_rjust): ditto. * string.c (rb_str_center): ditto. * eval.c (eval): retrieves file, line information from binding. * eval.c (intersect_fds): counts intersecting fds. * eval.c (rb_thread_schedule): only fds requested by each thread count as select_value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/object.c b/object.c
index 6f4a293..a8727e8 100644
--- a/object.c
+++ b/object.c
@@ -354,13 +354,6 @@ nil_inspect(obj)
return rb_str_new2("nil");
}
-static VALUE
-nil_type(obj)
- VALUE obj;
-{
- return rb_cNilClass;
-}
-
#ifdef NIL_PLUS
static VALUE
nil_plus(x, y)
@@ -398,13 +391,6 @@ true_to_s(obj)
}
static VALUE
-true_type(obj)
- VALUE obj;
-{
- return rb_cTrueClass;
-}
-
-static VALUE
true_and(obj, obj2)
VALUE obj, obj2;
{
@@ -433,13 +419,6 @@ false_to_s(obj)
}
static VALUE
-false_type(obj)
- VALUE obj;
-{
- return rb_cFalseClass;
-}
-
-static VALUE
false_and(obj, obj2)
VALUE obj, obj2;
{
@@ -485,13 +464,6 @@ rb_obj_alloc(klass)
}
static VALUE
-sym_type(sym)
- VALUE sym;
-{
- return rb_cSymbol;
-}
-
-static VALUE
sym_to_i(sym)
VALUE sym;
{
@@ -1011,11 +983,11 @@ rb_num2dbl(val)
return RFLOAT(val)->value;
case T_STRING:
- rb_raise(rb_eTypeError, "no implicit conversion from String");
+ rb_raise(rb_eTypeError, "no implicit conversion to float from string");
break;
case T_NIL:
- rb_raise(rb_eTypeError, "no implicit conversion from nil");
+ rb_raise(rb_eTypeError, "no implicit conversion to float from nil");
break;
default:
@@ -1197,7 +1169,6 @@ Init_Object()
rb_define_global_function("Array", rb_f_array, 1);
rb_cNilClass = rb_define_class("NilClass", rb_cObject);
- rb_define_method(rb_cNilClass, "type", nil_type, 0);
rb_define_method(rb_cNilClass, "to_i", nil_to_i, 0);
rb_define_method(rb_cNilClass, "to_s", nil_to_s, 0);
rb_define_method(rb_cNilClass, "to_a", nil_to_a, 0);
@@ -1214,7 +1185,6 @@ Init_Object()
rb_undef_method(CLASS_OF(rb_cSymbol), "new");
rb_define_singleton_method(rb_cSymbol, "all_symbols", rb_sym_all_symbols, 0);
- rb_define_method(rb_cSymbol, "type", sym_type, 0);
rb_define_method(rb_cSymbol, "to_i", sym_to_i, 0);
rb_define_method(rb_cSymbol, "to_int", sym_to_i, 0);
rb_define_method(rb_cSymbol, "inspect", sym_inspect, 0);
@@ -1271,7 +1241,6 @@ Init_Object()
rb_cTrueClass = rb_define_class("TrueClass", rb_cObject);
rb_define_method(rb_cTrueClass, "to_s", true_to_s, 0);
- rb_define_method(rb_cTrueClass, "type", true_type, 0);
rb_define_method(rb_cTrueClass, "&", true_and, 1);
rb_define_method(rb_cTrueClass, "|", true_or, 1);
rb_define_method(rb_cTrueClass, "^", true_xor, 1);
@@ -1280,7 +1249,6 @@ Init_Object()
rb_cFalseClass = rb_define_class("FalseClass", rb_cObject);
rb_define_method(rb_cFalseClass, "to_s", false_to_s, 0);
- rb_define_method(rb_cFalseClass, "type", false_type, 0);
rb_define_method(rb_cFalseClass, "&", false_and, 1);
rb_define_method(rb_cFalseClass, "|", false_or, 1);
rb_define_method(rb_cFalseClass, "^", false_xor, 1);