summaryrefslogtreecommitdiff
path: root/test/ruby/test_range.rb
AgeCommit message (Collapse)Author
2016-01-23* range.c (range_eqq): revert r11113 because rb_call_super() isshugo
called in range_include() and thus r11113 doesn't work when the receiver Range object consists of non linear objects such as Date objects. [ruby-core:72908] [Bug #12003] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03range.c: infected by the receivernobu
* range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* test/ruby/test_range.rb: Add test case for Range#end withhsbt
exclude_end true case. [fix GH-968] Pach by @yui-knk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21* test/ruby/test_range.rb: Add test for Range#hashhsbt
[fix GH-969] Patch by @yui-knk git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-17test_range.rb: add Range#new testnobu
* test/ruby/test_range.rb (test_first_last): Add test for `Range.new`. [Fix GH-971] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-17test_range.rb: add Range#last assertionsnobu
* test/ruby/test_range.rb (test_first_last): Add assertions to test of `Range#last` with exclude_end true case. [Fix GH-970] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-03range.c: covered for linear objectsnobu
* range.c (linear_object_p, range_include): test if covered for linear objects. [ruby-core:69052] [Bug #11113] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13range.c: class name encodingnobu
* range.c (range_bsearch): preserve encoding of class name in an exception message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13* enum.c (nmin_run): max(n) and max_by(n) returns an array inakr
descending order. [ruby-core:65452] Suggested by David Grayson. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-26* test/ruby/test_range.rb: added workaround for VERBOSE message.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-14* enum.c: Enumerable#{min,min_by,max,max_by} extended to take anakr
optional argument. (nmin_cmp): New function. (nmin_block_cmp): Ditto (nmin_filter): Ditto. (nmin_i): Ditto. (nmin_run): Ditto. (enum_min): Call nmin_run if the optional argument is given. (nmin_max): Ditto. (nmin_min_by): Ditto. (nmin_max_by): Ditto. * range.c: Range#{min,max} extended to take an optional argument. (range_min): Call range_first if the optional argument is given. (range_max): Call rb_call_super if the optional argument is given. [ruby-core:57111] [Feature #8887] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13test/ruby: better assertionsnobu
* test/ruby: use better assertions instead of mere assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30range.c: revert the old behaviornobu
* range.c (range_each): revert the old behavior, no block is given to the yielded block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26range.c: modify checknobu
* range.c (range_initialize_copy): disallow to modify after initialized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08test_range.rb: remove invalid assertionsnobu
* test/ruby/test_range.rb: remove invalid assertions for [Bug #8739]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08Follow r42431naruse
Follow tests to revert r42400. [Bug #8739] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06range.c: return nil for empty rangenobu
* range.c (range_last): return nil for empty range, or in the case the predecessor is smaller than the begin. [Bug #8739] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06range.c: consider exclusivenobu
* range.c (range_last): exclude the last number of the exclusive range if the end is Numeric. [ruby-dev:47587] [Bug #8739] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05test_range.rb: refine messagenobu
* test/ruby/test_range.rb (TestRange#test_bsearch_with_mathn): refine failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05* range.c: Use div instead of / for bsearchmarcandre
* test/ruby/test_range.rb: Test showing bug when requiring mathn git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30* array.c (rb_ary_bsearch): Raise TypeError on bad return from blockmarcandre
* range.c (range_bsearch): ditto * test/ruby/test_array.rb (class): Test for above * test/ruby/test_range.rb (class): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30* range.c: Restrict bsearch to integers [#7728]marcandre
* test/ruby/test_range.rb: Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30* array.c (rb_ary_bsearch): Return enumerator if no block [#7725]marcandre
* range.c (range_bsearch): ditto * test/ruby/test_array.rb: Test for above * test/ruby/test_range.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-29* range.c: Fix Range#bsearch for floats [Bug #7724]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-15* range.c (range_bsearch): fix some bugs: a documentation bug, a wrongmame
condition, missed break in switch/case, and workaround for GCC optimization. See [ruby-core:49364] in detail. A great patch from Heesob Park. [Bug #7352] [Feature #4766] * array.c (rb_ary_bsearch): fix similar bug (missed break). * test/ruby/test_range.rb: add two test cases for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-14* array.c (rb_ary_bsearch): add Array#bsearch for binary search.mame
[ruby-core:36390] [Feature #4766] * test/ruby/test_array.rb: add a test for above. * range.c (range_bsearch): add Range#bsearch for binary search. [ruby-core:36390] [Feature #4766] * test/ruby/test_range.rb: add a test for above * NEWS: added the two new methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* range.c: Support for Range#size and Range#each.sizemarcandre
[Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 * range.c (range_max): fix behavior with excluded end value.tarui
[Bug #4591] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-18* test/ruby/test_range.rb (TestRange#test_step_ruby_core_35753):usa
avoid float error. [ruby-core:35804] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-14* numeric.c (ruby_float_step): wrong loop condition.usa
fixes [ruby-core:35753], reported by Joey Zhou. * test/ruby/test_range.rb (TestRange#test_step_ruby_core_35753): test above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26* ext/socket/extconf.rb: suppress a warning.akr
* ext/extmk.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-26* test/ruby/test_range.rb (TestRange#test_comparison_when_recursive):yugui
test for r25010. * test/ruby/test_struct.rb (TestStruct#test_comparison_when_recursive): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23* string.c (rb_str_upto): keep first width. [ruby-dev:39361]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-17* range.c (range_step): treat symbols specially so that iteratingmatz
over symbols should work like strings. [ruby-core:24780] * range.c (range_each): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-17* range.c (range_each): should honor to_str conversion.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16* string.c (rb_str_upto): generate numerical sequence whenmatz
characters in both edges are all digits. [ruby-talk:343186] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05* range.c (range_eql, range_eq): fixed equality to work formatz
subclasses of Range. a patch from Marc-Andre Lafortune. [ruby-core:22190] * test/ruby/test_range.rb: add assertions for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02* test/ruby/test_range.rb: add a test.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-02add tests for [ruby-dev:34557] and [ruby-dev:34558].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-06* bignum.c (rb_cmpint): moved from compar.c, to check bignummatz
zero. * range.c (range_step): add step for each iteration if begin and end are numeric. [ruby-core:15990] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-29* test/ruby/test_range.rb: add tests to achieve over 90% test coveragemame
of range.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-10* range.c (range_dumper): make uninitialized range dumpable.akr
(range_loader): make uninitialized range loadable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-10* range.c: represent initialized state using EXCL instead of FL_USER3.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-13* range.c (range_max, range_min): return nil for empty set as well asnobu
1.8 and Enumerable. [ruby-dev:31198] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12add tests for [ruby-dev:31189] and [ruby-dev:31190].akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-25* range.c (range_max): treat end exclusion without iteration ifmatz
the end value is an integer. [ruby-talk:167433] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05add exclude_end? method to DuckRange.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04add a test for duck-type range.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e