[macruby-changes] [5294] MacRuby/trunk/object.c
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 23 09:01:23 PDT 2011
Revision: 5294
http://trac.macosforge.org/projects/ruby/changeset/5294
Author: watson1978 at gmail.com
Date: 2011-03-23 09:01:21 -0700 (Wed, 23 Mar 2011)
Log Message:
-----------
convert_type() should be passed value of boolean with 4th argument because its value is checked with "if (raise) " in convert_type().
Modified Paths:
--------------
MacRuby/trunk/object.c
Modified: MacRuby/trunk/object.c
===================================================================
--- MacRuby/trunk/object.c 2011-03-23 06:03:43 UTC (rev 5293)
+++ MacRuby/trunk/object.c 2011-03-23 16:01:21 UTC (rev 5294)
@@ -2521,7 +2521,7 @@
if (TYPE(val) == type) {
return val;
}
- VALUE v = convert_type(val, tname, method, Qtrue);
+ VALUE v = convert_type(val, tname, method, TRUE);
if (TYPE(v) != type) {
const char *cname = rb_obj_classname(val);
rb_raise(rb_eTypeError, "can't convert %s to %s (%s#%s gives %s)",
@@ -2539,7 +2539,7 @@
if (TYPE(val) == type && type != T_DATA) {
return val;
}
- v = convert_type(val, tname, method, Qfalse);
+ v = convert_type(val, tname, method, FALSE);
if (NIL_P(v)) {
return Qnil;
}
@@ -2558,7 +2558,7 @@
VALUE v;
if (FIXNUM_P(val)) return val;
- v = convert_type(val, "Integer", method, Qtrue);
+ v = convert_type(val, "Integer", method, TRUE);
if (!rb_obj_is_kind_of(v, rb_cInteger)) {
const char *cname = rb_obj_classname(val);
rb_raise(rb_eTypeError, "can't convert %s to Integer (%s#%s gives %s)",
@@ -2573,7 +2573,7 @@
VALUE v;
if (FIXNUM_P(val)) return val;
- v = convert_type(val, "Integer", method, Qfalse);
+ v = convert_type(val, "Integer", method, FALSE);
if (!rb_obj_is_kind_of(v, rb_cInteger)) {
return Qnil;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20110323/bef530d7/attachment.html>
More information about the macruby-changes
mailing list