summaryrefslogtreecommitdiff
path: root/spec/ruby/optional/capi/module_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2019-07-27 12:40:09 +0200
committerBenoit Daloze <[email protected]>2019-07-27 12:40:09 +0200
commit5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch)
tree05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/optional/capi/module_spec.rb
parenta06301b103371b0b7da8eaca26ba744961769f99 (diff)
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/optional/capi/module_spec.rb')
-rw-r--r--spec/ruby/optional/capi/module_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/ruby/optional/capi/module_spec.rb b/spec/ruby/optional/capi/module_spec.rb
index b94e96e846..34e6db82d8 100644
--- a/spec/ruby/optional/capi/module_spec.rb
+++ b/spec/ruby/optional/capi/module_spec.rb
@@ -54,7 +54,7 @@ describe "CApiModule" do
it "raises a TypeError if the constant is not a module" do
::CApiModuleSpecsGlobalConst = 7
- lambda { @m.rb_define_module("CApiModuleSpecsGlobalConst") }.should raise_error(TypeError)
+ -> { @m.rb_define_module("CApiModuleSpecsGlobalConst") }.should raise_error(TypeError)
Object.send :remove_const, :CApiModuleSpecsGlobalConst
end
@@ -303,7 +303,7 @@ describe "CApiModule" do
a = cls.new
@m.rb_define_singleton_method a, "module_specs_singleton_method"
a.module_specs_singleton_method.should == :test_method
- lambda { cls.new.module_specs_singleton_method }.should raise_error(NoMethodError)
+ -> { cls.new.module_specs_singleton_method }.should raise_error(NoMethodError)
end
end
@@ -323,7 +323,7 @@ describe "CApiModule" do
end
it "does not raise exceptions when passed a missing name" do
- lambda { @m.rb_undef_method @class, "not_exist" }.should_not raise_error
+ -> { @m.rb_undef_method @class, "not_exist" }.should_not raise_error
end
describe "when given a frozen Class" do
@@ -332,11 +332,11 @@ describe "CApiModule" do
end
it "raises a #{frozen_error_class} when passed a name" do
- lambda { @m.rb_undef_method @frozen, "ruby_test_method" }.should raise_error(frozen_error_class)
+ -> { @m.rb_undef_method @frozen, "ruby_test_method" }.should raise_error(frozen_error_class)
end
it "raises a #{frozen_error_class} when passed a missing name" do
- lambda { @m.rb_undef_method @frozen, "not_exist" }.should raise_error(frozen_error_class)
+ -> { @m.rb_undef_method @frozen, "not_exist" }.should raise_error(frozen_error_class)
end
end
end