From db196eef2409f618f30b6ced4b652c463e8574cf Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 30 Oct 2009 08:05:31 +0000 Subject: [PATCH] * test/ruby/test_enum.rb (test_count): marked as an implementation specific test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_enum.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/ruby/test_enum.rb b/test/ruby/test_enum.rb index a805ee6e55..4b71f5b6cc 100644 --- a/test/ruby/test_enum.rb +++ b/test/ruby/test_enum.rb @@ -36,14 +36,16 @@ class TestEnumerable < Test::Unit::TestCase assert_equal(2, @obj.count(1) {|x| x % 2 == 1 }) assert_raise(ArgumentError) { @obj.count(0, 1) } - en = Class.new { - include Enumerable - alias :size :count - def each - yield 1 - end - } - assert_equal(1, en.new.count, '[ruby-core:24794]') + if RUBY_ENGINE == "ruby" + en = Class.new { + include Enumerable + alias :size :count + def each + yield 1 + end + } + assert_equal(1, en.new.count, '[ruby-core:24794]') + end end def test_find