Skip to content

Instantly share code, notes, and snippets.

@kronos
Created March 9, 2010 22:25
Show Gist options
  • Save kronos/327212 to your computer and use it in GitHub Desktop.
Save kronos/327212 to your computer and use it in GitHub Desktop.
diff --git a/spec/ruby/core/array/hash_spec.rb b/spec/ruby/core/array/hash_spec.rb
index d20a591..7c7257c 100644
--- a/spec/ruby/core/array/hash_spec.rb
+++ b/spec/ruby/core/array/hash_spec.rb
@@ -11,6 +11,12 @@ describe "Array#hash" do
end
end
+ it "returns different value for arrays with the same content in different order" do
+ [1, 2].hash.should_not == [2, 1].hash
+ [1, 2, 3, 3].hash.should_not == [3, 1, 2, 3].hash
+ ['jruby', 'ruby', 'rubinius'].hash.should_not == ['rubinius', 'jruby', 'ruby'].hash
+ end
+
ruby_bug "#", "1.8.6.277" do
it "properly handles recursive arrays" do
empty = ArraySpecs.empty_recursive_array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment