diff options
author | Zloy <zhoran@inbox.ru> | 2015-01-14 06:56:43 -0500 |
---|---|---|
committer | dB <dblock@dblock.org> | 2015-01-14 06:56:43 -0500 |
commit | c2225e0d261e570f6a56a5cfb772e548ff7af42b (patch) | |
tree | 5fd50ceb1bc9e87d259ecf720a250504bcb081e3 /UPGRADING.md | |
parent | eeba6ee3af413c8623fdb55864a6eb33d907e743 (diff) | |
download | hashie-c2225e0d261e570f6a56a5cfb772e548ff7af42b.tar.gz |
Methods such as abc? return true/false Hashie::Extensions::MethodReader.
Diffstat (limited to 'UPGRADING.md')
-rw-r--r-- | UPGRADING.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/UPGRADING.md b/UPGRADING.md index 25e8a84..f9ab157 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -1,6 +1,30 @@ Upgrading Hashie ================ +### Upgrading to 3.2.2 + +#### Testing if key defined + +In versions <= 3.2.1 Hash object being questioned doesn't return a boolean value as it's mentioned in README.md + +```ruby +class MyHash < Hash + include Hashie::Extensions::MethodAccess +end + +h = MyHash.new +h.abc = 'def' +h.abc # => 'def' +h.abc? # => 'def' +``` + +In versions >= 3.2.2 it returns a boolean value + +```ruby +h.abc? # => true +h.abb? # => false +``` + ### Upgrading to 3.2.1 #### Possible coercion changes |