diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-20 08:56:42 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-20 08:56:42 +0000 |
commit | 265442fbdbd384fdf68782613c200b86cdf2f0af (patch) | |
tree | 48f0b3d55c5ae930f5b63e58e581a49dcc37d2ed /numeric.c | |
parent | 861095398453d08ed3b104c1f3bad4d970552fab (diff) |
1.1b8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@86 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -37,7 +37,9 @@ static VALUE num_coerce(x, y) VALUE x, y; { - return assoc_new(rb_Float(x),rb_Float(y)); + if (CLASS_OF(x) == CLASS_OF(y)) + return assoc_new(x, y); + return assoc_new(rb_Float(x), rb_Float(y)); } coerce_body(x) |