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: ad3e5c15b113
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d82c28a7c6a1
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Dec 13, 2015

  1. Copy the full SHA
    9147a07 View commit details
  2. Merge pull request #3539 from kachick/class-initialize

    Prevent to make subclass of Class
    kares committed Dec 13, 2015
    Copy the full SHA
    d82c28a View commit details
Showing with 3 additions and 1 deletion.
  1. +3 −0 core/src/main/java/org/jruby/RubyClass.java
  2. +0 −1 spec/tags/ruby/core/class/initialize_tags.txt
3 changes: 3 additions & 0 deletions core/src/main/java/org/jruby/RubyClass.java
Original file line number Diff line number Diff line change
@@ -1138,6 +1138,9 @@ public static void checkInheritable(IRubyObject superClass) {
if (((RubyClass)superClass).isSingleton()) {
throw superClass.getRuntime().newTypeError("can't make subclass of virtual class");
}
if (superClass == superClass.getRuntime().getClassClass()) {
throw superClass.getRuntime().newTypeError("can't make subclass of Class");
}
}

public final ObjectMarshal getMarshal() {
1 change: 0 additions & 1 deletion spec/tags/ruby/core/class/initialize_tags.txt

This file was deleted.