summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-27 15:39:01 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-27 15:39:01 +0000
commit5b89a56b4f2fe7c71f3d718062ee43c9e3b15cd0 (patch)
treed49224879c81bfe5b68e8fbbe40fc8c6da92e0fd
parentc15e0070ce31402d3a18c6354afc1075391da983 (diff)
* bignum.c (rb_big_size): Return the bignum "bytewise" size.
[ruby-core:55578] [Feature #8553] This is accepted by matz on DevelopersMeeting20130727Japan. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--bignum.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4075dbf911f..cab8d4350b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jul 28 00:35:14 2013 Tanaka Akira <akr@fsij.org>
+
+ * bignum.c (rb_big_size): Return the bignum "bytewise" size.
+ [ruby-core:55578] [Feature #8553]
+ This is accepted by matz on DevelopersMeeting20130727Japan.
+
Sun Jul 28 00:07:48 2013 Tanaka Akira <akr@fsij.org>
* include/ruby/intern.h (rb_integer_pack): Declaration moved from
diff --git a/bignum.c b/bignum.c
index b5636691c42..b028434b044 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6284,7 +6284,7 @@ rb_big_abs(VALUE x)
static VALUE
rb_big_size(VALUE big)
{
- return LONG2FIX(RBIGNUM_LEN(big)*SIZEOF_BDIGITS);
+ return SIZET2NUM(BIGSIZE(big));
}
/*