From 42847962b4df1f48d85a4ea0c4d8964bc62ba704 Mon Sep 17 00:00:00 2001 From: this guy Date: Thu, 8 Sep 2011 22:04:43 -0700 Subject: [PATCH] Fixed discrepancy between results for obj.methods in 1.8 v. 1.9 (String v. Symbol) and what looked to be a typo. --- koans/about_classes.rb | 2 +- koans/about_iteration.rb | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/koans/about_classes.rb b/koans/about_classes.rb index fce0be0..3fce646 100644 --- a/koans/about_classes.rb +++ b/koans/about_classes.rb @@ -126,7 +126,7 @@ class AboutClasses < EdgeCase::Koan # Why is this so? end - def test_different_objects_have_difference_instance_variables + def test_different_objects_have_different_instance_variables fido = Dog6.new("Fido") rover = Dog6.new("Rover") diff --git a/koans/about_iteration.rb b/koans/about_iteration.rb index b48c278..823128f 100644 --- a/koans/about_iteration.rb +++ b/koans/about_iteration.rb @@ -1,9 +1,16 @@ require File.expand_path(File.dirname(__FILE__) + '/edgecase') class AboutIteration < EdgeCase::Koan + in_ruby_version("1.8") do + def test_each_is_a_method_on_arrays + assert_equal __, [].methods.include?("each") + end + end - def test_each_is_a_method_on_arrays - assert_equal __, [].methods.include?(:each) + in_ruby_version("1.9") do + def test_each_is_a_method_on_arrays + assert_equal __, [].methods.include?(:each) + end end def test_iterating_with_each -- 1.8.0.2