Skip to content

Commit 2e07510

Browse files
committed
Move builtin/kernel* stuff to jruby/kernel*.
1 parent a3f5c0b commit 2e07510

18 files changed

+28
-17
lines changed

src/builtin/kernel.rb

-1
This file was deleted.

src/builtin/kernel18.rb

-1
This file was deleted.

src/builtin/kernel19.rb

-12
This file was deleted.

src/jruby/kernel.rb

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This is the primary kernel file, containing loads for subkernels that are
2+
# common to all supported versions of Ruby. Subsequent version-specific kernel
3+
# loads are expected to add and patch the behaviors loaded by this file.
4+
5+
# These are loads so they don't pollute LOADED_FEATURES
6+
load 'jruby/kernel/generator.rb'
File renamed without changes.

src/jruby/kernel18.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This is the Ruby 1.8.7-specific kernel file.
2+
3+
# These are loads so they don't pollute LOADED_FEATURES
4+
load 'jruby/kernel18/enumerator.rb'
File renamed without changes.

src/jruby/kernel19.rb

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This is the Ruby 1.9-specific kernel file.
2+
3+
# Thread features are always available in 1.9.
4+
require 'thread.jar'
5+
6+
# These are loads so they don't pollute LOADED_FEATURES
7+
load 'jruby/kernel19/mutex.rb'
8+
load 'jruby/kernel19/thread.rb'
9+
load 'jruby/kernel19/kernel.rb'
10+
load 'jruby/kernel19/proc.rb'
11+
load 'jruby/kernel19/process.rb'
12+
load 'jruby/kernel19/jruby/process_util.rb'
13+
load 'jruby/kernel19/enumerator.rb'
14+
load 'jruby/kernel19/enumerable.rb'
15+
load 'jruby/kernel19/rubygems.rb' unless JRuby::CONFIG.rubygems_disabled?
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/org/jruby/Ruby.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1552,14 +1552,14 @@ public void load(Ruby runtime, boolean wrap) throws IOException {
15521552

15531553
private void initRubyKernel() {
15541554
// load Ruby parts of core
1555-
loadFile("builtin/kernel.rb", getJRubyClassLoader().getResourceAsStream("builtin/kernel.rb"), false);
1555+
loadFile("jruby/kernel.rb", getJRubyClassLoader().getResourceAsStream("jruby/kernel.rb"), false);
15561556

15571557
switch (config.getCompatVersion()) {
15581558
case RUBY1_8:
1559-
loadFile("builtin/kernel18.rb", getJRubyClassLoader().getResourceAsStream("builtin/kernel18.rb"), false);
1559+
loadFile("jruby/kernel18.rb", getJRubyClassLoader().getResourceAsStream("jruby/kernel18.rb"), false);
15601560
break;
15611561
case RUBY1_9:
1562-
loadFile("builtin/kernel19.rb", getJRubyClassLoader().getResourceAsStream("builtin/kernel19.rb"), false);
1562+
loadFile("jruby/kernel19.rb", getJRubyClassLoader().getResourceAsStream("jruby/kernel19.rb"), false);
15631563
break;
15641564
}
15651565
}

0 commit comments

Comments
 (0)