summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_flip.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_flip.rb b/test/ruby/test_flip.rb
index 0f2ae09e18..11f387d7ac 100644
--- a/test/ruby/test_flip.rb
+++ b/test/ruby/test_flip.rb
@@ -2,6 +2,11 @@
require 'test/unit'
class TestFlip < Test::Unit::TestCase
+ def test_flip_flop
+ assert_equal [2], (1..9).select {|n| true if (n==2)..(n%2).zero?}
+ assert_equal [2,3,4], (1..9).select {|n| true if (n==2)...(n%2).zero?}
+ end
+
def test_hidden_key
bug6899 = '[ruby-core:47253]'
foo = "foor"