diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-28 19:50:06 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-28 19:50:06 +0000 |
commit | 4fbb9aa3cb6c31ec128bfb31f59efa66d66adba4 (patch) | |
tree | 84a654b260261fe172f2584f60b3ba93e59f841d /spec/ruby/optional/capi/class_spec.rb | |
parent | b864bd05bff2a61d55b08deb92e969f9fa55e07c (diff) |
Update to ruby/spec@6f38a82
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/optional/capi/class_spec.rb')
-rw-r--r-- | spec/ruby/optional/capi/class_spec.rb | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/spec/ruby/optional/capi/class_spec.rb b/spec/ruby/optional/capi/class_spec.rb index 85d7419fd2..acfb8e3728 100644 --- a/spec/ruby/optional/capi/class_spec.rb +++ b/spec/ruby/optional/capi/class_spec.rb @@ -257,34 +257,20 @@ describe "C-API Class function" do }.should raise_error(TypeError) end - ruby_version_is "2.3" do - it "raises a TypeError when given a mismatched class to superclass" do - CApiClassSpecs::ClassUnder6 = Class.new(CApiClassSpecs::Super) - lambda { @s.rb_define_class_under(CApiClassSpecs, - "ClassUnder6", - Class.new) - }.should raise_error(TypeError) - end - end - - ruby_version_is ""..."2.3" do - it "raises a NameError when given a mismatched class to superclass" do - CApiClassSpecs::ClassUnder6 = Class.new(CApiClassSpecs::Super) - lambda { @s.rb_define_class_under(CApiClassSpecs, - "ClassUnder6", - Class.new) - }.should raise_error(NameError) - end + it "raises a TypeError when given a mismatched class to superclass" do + CApiClassSpecs::ClassUnder6 = Class.new(CApiClassSpecs::Super) + lambda { @s.rb_define_class_under(CApiClassSpecs, + "ClassUnder6", + Class.new) + }.should raise_error(TypeError) end it "defines a class for an existing Autoload" do ClassUnderAutoload.name.should == "ClassUnderAutoload" end - ruby_version_is "2.3" do - it "raises a TypeError if class is defined and its superclass mismatches the given one" do - lambda { @s.rb_define_class_under(CApiClassSpecs, "Sub", Object) }.should raise_error(TypeError) - end + it "raises a TypeError if class is defined and its superclass mismatches the given one" do + lambda { @s.rb_define_class_under(CApiClassSpecs, "Sub", Object) }.should raise_error(TypeError) end end @@ -310,10 +296,8 @@ describe "C-API Class function" do ClassIdUnderAutoload.name.should == "ClassIdUnderAutoload" end - ruby_version_is "2.3" do - it "raises a TypeError if class is defined and its superclass mismatches the given one" do - lambda { @s.rb_define_class_id_under(CApiClassSpecs, :Sub, Object) }.should raise_error(TypeError) - end + it "raises a TypeError if class is defined and its superclass mismatches the given one" do + lambda { @s.rb_define_class_id_under(CApiClassSpecs, :Sub, Object) }.should raise_error(TypeError) end end |