test/ludy/test_symbol.rb in ludy-0.1.13 vs test/ludy/test_symbol.rb in ludy-0.1.15

- old
+ new

@@ -1,13 +1,18 @@ -require File.join(File.dirname(__FILE__), '..', 'helper') +require './test/helper' require 'ludy/symbol' class TestSymbol < Test::Unit::TestCase def test_curry a = [1,2,3] - assert_equal nil, a.find(&:==.curry[0]) - assert_equal 2, a.find(&:==.curry[2]) + if Ludy.ruby_before '1.9.0' + assert_equal nil, a.find(&:==.curry[0]) + assert_equal 2, a.find(&:==.curry[2]) + else + assert_equal nil, a.find(&:==.curry(2)[0]) + assert_equal 2, a.find(&:==.curry(2)[2]) + end end def test_to_msg assert_equal [3, 7], [[1,2],[3,4]].map(&:'inject(&:+)'.to_msg) assert_equal 29, :'to_i*2+9'.to_msg['10'] end