summaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-14 09:04:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-14 09:04:43 +0000
commit362c468cceba21361da888d51460335e223366a4 (patch)
treec91af57d9eab1255f6710aea3de3cd3fb313494b /numeric.c
parentf560b4adcc788b1c0473d739e04566e9bde6d46b (diff)
downloadruby-362c468cceba21361da888d51460335e223366a4.tar.gz
ruby-362c468cceba21361da888d51460335e223366a4.tar.xz
ruby-362c468cceba21361da888d51460335e223366a4.zip
* rubyio.h (struct OpenFile): add error raise flag to finalizer.
* io.c (Init_IO): define $/, $-0, and $\ as string-only variables. * string.c (rb_str_split_m): does not generate empty string if there's no match in the receiver. * io.c (fptr_finalize): should raise error on EBADF for readable IOs as well. * file.c (rb_stat): use rb_check_convert_type() to retrieve IO. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numeric.c b/numeric.c
index bd8be06d3..13466d789 100644
--- a/numeric.c
+++ b/numeric.c
@@ -93,11 +93,11 @@ static VALUE
coerce_rescue(x)
VALUE *x;
{
- volatile VALUE v;
+ volatile VALUE v = rb_inspect(x[1]);
rb_raise(rb_eTypeError, "%s can't be coerced into %s",
rb_special_const_p(x[1])?
- RSTRING(v = rb_inspect(x[1]))->ptr:
+ RSTRING(v)->ptr:
rb_obj_classname(x[1]),
rb_obj_classname(x[0]));
return Qnil; /* dummy */