From: Marc Peabody + Jim Weirich Date: Mon, 27 Sep 2010 22:24:25 +0000 (-0400) Subject: Added more think about its to the ruby/java string comparisons. X-Git-Tag: rubykoans-2010-11-29~14 X-Git-Url: https://git.eng.unimelb.edu.au/public?a=commitdiff_plain;h=1dcd9babd4fe285accf3998d94f8f95117cbda2d;p=ruby_koans.git Added more think about its to the ruby/java string comparisons. --- diff --git a/src/about_java_interop.rb b/src/about_java_interop.rb index b4fdbd5..2bc9628 100644 --- a/src/about_java_interop.rb +++ b/src/about_java_interop.rb @@ -75,7 +75,17 @@ class AboutJavaInterop < EdgeCase::Koan assert_equal __(true), java_string == ruby_string # THINK ABOUT IT: + # # Is there any possible way for this to be more wrong? + # + # SERIOUSLY, THINK ABOUT IT: + # + # Why do you suppose that Ruby and Java strings compare like that? + # + # ADVANCED THINK ABOUT IT: + # + # Is there a way to make Ruby/Java string comparisons commutative? + # How would you do it? end def test_however_most_methods_returning_strings_return_ruby_strings @@ -85,5 +95,4 @@ class AboutJavaInterop < EdgeCase::Koan assert_equal __(false), java_array.toString.is_a?(java.lang.String) end - end