loquor 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d5223911307f2a072de37742e93f4c08a67592a
4
- data.tar.gz: af4b9f1dc22ea1affdcb1b4d7df4813fdd9c42fa
3
+ metadata.gz: 67976c1b27cc7116c58be7007348984a3d653439
4
+ data.tar.gz: 8bfe7d6a68bfba4fd830f791e626002c0e2d796b
5
5
  SHA512:
6
- metadata.gz: 3a645d10cd0c71c6cc2e4495e9faef127a7b17659b227fe54f92bfa14faeaf808d82af1f098920d50a417726ec103d5f455b3064c50c732d68ab55b9a7541629
7
- data.tar.gz: 05207e53a713ec9892e96f960fa47572f68e3114c1b1ff57c0a5cdd8df98551371d25f6bee838269ac6fd0031c7a4d18cffb4bea6d24058817782cd76e820fad
6
+ metadata.gz: 26a431293bfd25cc5b312290c4dc57aa48c71459a7c5c9cdcd4f0cf57a54e7b12bf97aa743b0e79f5dc0746bc8c5aeb294266d8e9c2b63fb378ec72c41126328
7
+ data.tar.gz: 2ca3d98c59e01d8e7ab734bb0cbe324adcaf2c6f50010bc877ce4c88f7c1d6a6372656c724a5f336a258a0fd077a20b66bc578ee4d03c6c0c2d7b9b0fb62a302
@@ -1,3 +1,6 @@
1
+ # 1.1.1 / 2014-01-24
2
+ * [BUGFIX] Respond_to should respond to the same to symbols and strings.
3
+
1
4
  # 1.1.0 / 2014-01-24
2
5
  * [FEATURE] Add respond_to support for object hashes
3
6
 
@@ -38,7 +38,7 @@ module Loquor
38
38
 
39
39
  def respond_to?(key)
40
40
  return true if super
41
- @hash.has_key?(key)
41
+ @hash.has_key?(key.to_s) || @hash.has_key?(key.to_sym)
42
42
  end
43
43
 
44
44
  private
@@ -1,3 +1,3 @@
1
1
  module Loquor
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -37,6 +37,11 @@ module Loquor
37
37
  assert_equal true, representation.respond_to?(:foo)
38
38
  end
39
39
 
40
+ def test_respond_to_knows_about_hash_keys
41
+ representation = ObjectHash.new({foo: "bar"})
42
+ assert_equal true, representation.respond_to?('foo')
43
+ end
44
+
40
45
  def test_hash_keys_are_accessible_via_methods
41
46
  representation = ObjectHash.new({foo: "bar"})
42
47
  assert_equal "bar", representation.foo
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loquor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Walker