summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-25 07:07:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-25 07:07:43 +0000
commitf33958990a43b8a20ad7ed7eb1d30ec211b46f85 (patch)
treef962530dd96d7c293cba9d8f4bd6318d688c33f2 /range.c
parentd65fac5daa6838c9c56c6b6dd2f3127fe229d4e8 (diff)
* eval.c (ruby_run): should set toplevel visibility again here.
* eval.c (rb_eval): should not rely on ruby_class == rb_cObject check. Besides allow implicit publicity for attribute set methods. * parse.y (primary): need not to check class_nest, just set whether method is an attrset or not. * string.c (rb_str_each_line): p might be at the top of the string. * variable.c (rb_path2class): should not use rb_eval_string(). * parse.y (str_extend): expression substitution can contain string terminator again. * parse.y (yylex): the warning message "invalid character syntax" was never issued. * file.c (rb_find_file): $LOAD_PATH must not be empty. * file.c (rb_find_file_ext): ditto. * range.c (range_eq): class check should be based on range.class, instead of Range to work with Range.dup. * range.c (range_eql): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r--range.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/range.c b/range.c
index 8e3019df7b..6988e2e512 100644
--- a/range.c
+++ b/range.c
@@ -90,7 +90,7 @@ static VALUE
range_eq(range, obj)
VALUE range, obj;
{
- if (!rb_obj_is_kind_of(obj, rb_cRange)) return Qfalse;
+ if (!rb_obj_is_kind_of(obj, rb_obj_class(range))) return Qfalse;
if (!rb_equal(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
return Qfalse;
@@ -140,7 +140,7 @@ range_eql(range, obj)
VALUE range, obj;
{
if (range == obj) return Qtrue;
- if (!rb_obj_is_kind_of(obj, rb_cRange)) return Qfalse;
+ if (!rb_obj_is_kind_of(obj, rb_obj_class(range))) return Qfalse;
if (!rb_eql(rb_ivar_get(range, id_beg), rb_ivar_get(obj, id_beg)))
return Qfalse;