Permalink
Browse files

Remove crazy

  • Loading branch information...
1 parent 8db90ba commit cbb524122c6132ba37661934c09b540a68b1c64d Carl Lerche committed Mar 12, 2010
Showing with 0 additions and 28 deletions.
  1. +0 −1 spec/support/doubles.rb
  2. +0 −27 spec/support/doubles/hash.rb
@@ -1 +0,0 @@
-require "support/doubles/hash"
@@ -1,27 +0,0 @@
-class Hash
- def ordered_array
- 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)
- end
- end
-end

0 comments on commit cbb5241

Please sign in to comment.