ruby-changes:2676
From: ko1@a...
Date: 10 Dec 2007 08:25:52 +0900
Subject: [ruby-changes:2676] matz - Ruby:r14167 (trunk): * object.c (rb_obj_not_match): wrong test.
matz 2007-12-10 08:25:20 +0900 (Mon, 10 Dec 2007)
New Revision: 14167
Modified files:
trunk/ChangeLog
trunk/object.c
Log:
* object.c (rb_obj_not_match): wrong test.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14167&r2=14166
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/object.c?r1=14167&r2=14166
Index: ChangeLog
===================================================================
--- ChangeLog (revision 14166)
+++ ChangeLog (revision 14167)
@@ -2,6 +2,8 @@
* parse.y (parser_yylex): wrong token was generated. [ruby-dev:32498]
+ * object.c (rb_obj_not_match): wrong test.
+
Mon Dec 10 06:44:47 2007 Tanaka Akira <akr@f...>
* re.c (rb_reg_expr_str): use \xHH instead of \OOO.
Index: object.c
===================================================================
--- object.c (revision 14166)
+++ object.c (revision 14167)
@@ -32,7 +32,7 @@
VALUE rb_cTrueClass;
VALUE rb_cFalseClass;
-static ID id_eq, id_eql, id_inspect, id_init_copy;
+static ID id_eq, id_eql, id_match, id_inspect, id_init_copy;
/*
* call-seq:
@@ -1033,7 +1033,8 @@
static VALUE
rb_obj_not_match(VALUE obj1, VALUE obj2)
{
- return Qtrue;
+ VALUE result = rb_funcall(obj1, id_match, 1, obj2);
+ return RTEST(result) ? Qfalse : Qtrue;
}
@@ -2501,6 +2502,7 @@
id_eq = rb_intern("==");
id_eql = rb_intern("eql?");
+ id_match = rb_intern("=~");
id_inspect = rb_intern("inspect");
id_init_copy = rb_intern("initialize_copy");
}
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml