Skip to content

Commit

Permalink
Added more think about its to the ruby/java string comparisons.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Peabody + Jim Weirich committed Sep 27, 2010
1 parent 45523c0 commit 1dcd9ba
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/about_java_interop.rb
Expand Up @@ -75,7 +75,17 @@ def test_java_strings_can_be_compared_to_ruby_strings_maybe
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
Expand All @@ -85,5 +95,4 @@ def test_however_most_methods_returning_strings_return_ruby_strings
assert_equal __(false), java_array.toString.is_a?(java.lang.String)
end


end

0 comments on commit 1dcd9ba

Please sign in to comment.