Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a3e6233f706f
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fad62e6af3fb
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on May 10, 2016

  1. Add a spec for MRI Bug #12367

    eregon committed May 10, 2016
    Copy the full SHA
    509f703 View commit details
  2. Copy the full SHA
    e58e545 View commit details
  3. [Truffle] Add tag.

    eregon committed May 10, 2016
    Copy the full SHA
    fad62e6 View commit details
Showing with 29 additions and 0 deletions.
  1. +28 −0 spec/ruby/language/class_spec.rb
  2. +1 −0 spec/truffle/tags/language/class_tags.txt
28 changes: 28 additions & 0 deletions spec/ruby/language/class_spec.rb
Original file line number Diff line number Diff line change
@@ -83,6 +83,34 @@ class SuperclassReopenedBasicObject < A
class SuperclassReopenedBasicObject < BasicObject
end
}.should raise_error(TypeError, /superclass mismatch/)
SuperclassReopenedBasicObject.superclass.should == A
end
end

# [Bug #12367] [ruby-core:75446]
it "raises an error when reopening a class with Object as superclass" do
module ClassSpecs
class SuperclassReopenedObject < A
end
SuperclassReopenedObject.superclass.should == A

lambda {
class SuperclassReopenedObject < Object
end
}.should raise_error(TypeError, /superclass mismatch/)
SuperclassReopenedObject.superclass.should == A
end
end

it "allows reopening a class without specifying the superclass" do
module ClassSpecs
class SuperclassNotGiven < A
end
SuperclassNotGiven.superclass.should == A

class SuperclassNotGiven
end
SuperclassReopenedObject.superclass.should == A
end
end

1 change: 1 addition & 0 deletions spec/truffle/tags/language/class_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:A class definition raises an error when reopening a class with Object as superclass