diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-17 15:08:33 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-17 15:08:33 +0000 |
commit | ce86f79c7b3b7eb31f054fefd22cce5fc8a589d1 (patch) | |
tree | 4d6b6911dd87338b8ec012e07ef56853fc9cf30c /internal.h | |
parent | 808be5f96b17246341c0ee7a32e2bbae3e8dc13f (diff) | |
download | ruby-ce86f79c7b3b7eb31f054fefd22cce5fc8a589d1.tar.gz |
Optimize enum_sum for a range from int to int
* enum.c (enum_sum): Optimize for a range from int to int.
* test/ruby/test_enum.rb (test_range_sum): Move from test_range.rb,
and add assertions for some conditions.
* test/ruby/test_enum.rb (test_hash_sum): Move from test_hash.rb.
* test/ruby/test_hash.rb, test/ruby/test_range.rb: Remove test_sum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal.h b/internal.h index 78ae77d806..2816737390 100644 --- a/internal.h +++ b/internal.h @@ -1097,6 +1097,7 @@ VALUE rb_int_round(VALUE num, int ndigits); VALUE rb_int2str(VALUE num, int base); VALUE rb_dbl_hash(double d); VALUE rb_fix_plus(VALUE x, VALUE y); +VALUE rb_int_ge(VALUE x, VALUE y); #if USE_FLONUM #define RUBY_BIT_ROTL(v, n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n))) |