Skip to content
Browse files

Move #[] constructor to CRUDHash.

  • Loading branch information...
1 parent 6d06089 commit 61922741434c02e39499a2338a7ae962374ba204 @trans trans committed
Showing with 6 additions and 13 deletions.
  1. +0 −7 lib/hashery/key_hash.rb
  2. +6 −6 test/case_key_hash.rb
View
7 lib/hashery/key_hash.rb
@@ -38,13 +38,6 @@ module Hashery
class KeyHash < CRUDHash
#
- def self.[](*hash)
- s = new
- super(*hash).each{ |k,v| s[k] = v }
- s
- end
-
- #
# Unlike a regular Hash, a KeyHash's block sets the `key_proc` rather
# than the `default_proc`.
#
View
12 test/case_key_hash.rb
@@ -170,12 +170,12 @@
end
end
- method :cast_key do
- test do
- s = KeyHash.new
- s.pry.cast_key(:a).assert == 'a'
- end
- end
+ #method :cast_key do
+ # test do
+ # s = KeyHash.new
+ # s.send(:cast_key, :a).assert == 'a'
+ # end
+ #end
end

0 comments on commit 6192274

Please sign in to comment.
Something went wrong with that request. Please try again.