diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-10-06 03:28:28 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-10-06 03:28:28 +0000 |
commit | 75ff8fdb16fa0a733512e61350c9844ea530ad35 (patch) | |
tree | a057e60543c77d6e20ea2e91928928df80b2b6d3 /numeric.c | |
parent | 5d71c8d89c6bd7af934e7a8de5882cda2991711b (diff) |
join 1.1c6
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1dev@310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -87,6 +87,14 @@ rb_num_coerce_bin(x, y) } static VALUE +num_clone(x) + VALUE x; +{ + /* Numerics are immutable values, which need not to copy */ + return x; +} + +static VALUE num_uplus(num) VALUE num; { @@ -1354,6 +1362,7 @@ Init_Numeric() rb_include_module(rb_cNumeric, rb_mComparable); rb_define_method(rb_cNumeric, "coerce", num_coerce, 1); + rb_define_method(rb_cNumeric, "clone", num_clone, 0); rb_define_method(rb_cNumeric, "+@", num_uplus, 0); rb_define_method(rb_cNumeric, "-@", num_uminus, 0); |