Permalink
Browse files

Move #[] constructor to CRUDHash.

  • Loading branch information...
trans committed May 15, 2012
1 parent 6d06089 commit 61922741434c02e39499a2338a7ae962374ba204
Showing with 6 additions and 13 deletions.
  1. +0 −7 lib/hashery/key_hash.rb
  2. +6 −6 test/case_key_hash.rb
View
@@ -37,13 +37,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
@@ -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.