diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/core/module/attr_reader_spec.rb | |
parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/core/module/attr_reader_spec.rb')
-rw-r--r-- | spec/ruby/core/module/attr_reader_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/core/module/attr_reader_spec.rb b/spec/ruby/core/module/attr_reader_spec.rb index f537b5f1c6..082bc03b60 100644 --- a/spec/ruby/core/module/attr_reader_spec.rb +++ b/spec/ruby/core/module/attr_reader_spec.rb @@ -29,7 +29,7 @@ describe "Module#attr_reader" do attr_reader :spec_attr_reader end - lambda { true.instance_variable_set("@spec_attr_reader", "a") }.should raise_error(RuntimeError) + -> { true.instance_variable_set("@spec_attr_reader", "a") }.should raise_error(RuntimeError) end it "converts non string/symbol/fixnum names to strings using to_str" do @@ -44,9 +44,9 @@ describe "Module#attr_reader" do it "raises a TypeError when the given names can't be converted to strings using to_str" do o = mock('o') - lambda { Class.new { attr_reader o } }.should raise_error(TypeError) + -> { Class.new { attr_reader o } }.should raise_error(TypeError) (o = mock('123')).should_receive(:to_str).and_return(123) - lambda { Class.new { attr_reader o } }.should raise_error(TypeError) + -> { Class.new { attr_reader o } }.should raise_error(TypeError) end it "applies current visibility to methods created" do @@ -55,7 +55,7 @@ describe "Module#attr_reader" do attr_reader :foo end - lambda { c.new.foo }.should raise_error(NoMethodError) + -> { c.new.foo }.should raise_error(NoMethodError) end ruby_version_is ''...'2.5' do |