diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-30 12:46:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-30 12:46:53 +0000 |
commit | ed2af78b67333c419ba051e27fb7e34e8876edf0 (patch) | |
tree | 588850632325968eaf3bf2f64270358c3adf5384 /test/ruby/test_flip.rb | |
parent | 107ba65fba13bdf791e5dae0305c5768e6f7d122 (diff) | |
download | ruby-ed2af78b67333c419ba051e27fb7e34e8876edf0.tar.gz |
test_flip.rb: add
* test/ruby/test_flip.rb (test_flip_flop): basic test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_flip.rb')
-rw-r--r-- | test/ruby/test_flip.rb | 5 |
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" |