aboutsummaryrefslogtreecommitdiffstats
path: root/spec/doubles
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2009-09-20 12:59:32 -0400
committerBryan Helmkamp <bryan@brynary.com>2009-09-20 12:59:32 -0400
commit927d8b8cde930244a16215c57896c8e45f616d0f (patch)
tree0edfba7f236dddb2a3585a591588c21651dbb8b7 /spec/doubles
parent6690e3c007f65a39797a92462aaabf564bc709b4 (diff)
downloadrails-927d8b8cde930244a16215c57896c8e45f616d0f.tar.gz
rails-927d8b8cde930244a16215c57896c8e45f616d0f.tar.bz2
rails-927d8b8cde930244a16215c57896c8e45f616d0f.zip
Fix almost all Ruby warnings during spec suite
Diffstat (limited to 'spec/doubles')
-rw-r--r--spec/doubles/hash.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/doubles/hash.rb b/spec/doubles/hash.rb
index 32c5b98058..fd9edd34ad 100644
--- a/spec/doubles/hash.rb
+++ b/spec/doubles/hash.rb
@@ -3,18 +3,22 @@ class Hash
to_a.sort { |(key1, value1), (key2, value2)| key1.hash <=> key2.hash }
end
+ undef :keys
def keys
ordered_array.collect(&:first)
end
+ undef :values
def values
ordered_array.collect { |_, v| v }
end
+ undef :each
def each(&block)
ordered_array.each(&block)
end
+ undef :shift
def shift
returning to_a.first do |k, v|
delete(k)