summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml1
-rw-r--r--spec/hashie/mash_spec.rb14
2 files changed, 12 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index ee28372..f5c391b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,4 +16,3 @@ matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- - rvm: 2.2.1 # https://github.com/intridea/hashie/pull/285
diff --git a/spec/hashie/mash_spec.rb b/spec/hashie/mash_spec.rb
index ce78052..42ef67f 100644
--- a/spec/hashie/mash_spec.rb
+++ b/spec/hashie/mash_spec.rb
@@ -346,15 +346,25 @@ describe Hashie::Mash do
it 'responds to a set key with a suffix' do
%w(= ? ! _).each do |suffix|
expect(subject).to be_respond_to(:"abc#{suffix}")
- expect(subject.method(:"abc#{suffix}")).to_not be_nil
end
+
+ # for ruby 2.2 - https://github.com/intridea/hashie/pull/285
+ expect(subject.method(:"abc#{'='}")).to_not be_nil
+ expect(subject.method(:"abc#{'?'}")).to_not be_nil
+ expect(subject.method(:"abc#{'!'}")).to_not be_nil
+ expect(subject.method(:"abc#{'_'}")).to_not be_nil
end
it 'responds to an unknown key with a suffix' do
%w(= ? ! _).each do |suffix|
expect(subject).to be_respond_to(:"xyz#{suffix}")
- expect(subject.method(:"xyz#{suffix}")).to_not be_nil
end
+
+ # for ruby 2.2 - https://github.com/intridea/hashie/pull/285
+ expect(subject.method(:"xyz#{'='}")).to_not be_nil
+ expect(subject.method(:"xyz#{'?'}")).to_not be_nil
+ expect(subject.method(:"xyz#{'!'}")).to_not be_nil
+ expect(subject.method(:"xyz#{'_'}")).to_not be_nil
end
it 'does not respond to an unknown key without a suffix' do