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

Commits on Jun 22, 2016

  1. make kernel.rb (ji extension - top-level pkg methods) loadable

    ... without having any effect + added yard-doco
    kares committed Jun 22, 2016
    Copy the full SHA
    b8203ee View commit details
  2. remove unused imports

    kares committed Jun 22, 2016
    Copy the full SHA
    a37c346 View commit details
Showing with 23 additions and 14 deletions.
  1. +0 −2 core/src/main/java/org/jruby/compiler/JITCompiler.java
  2. +23 −12 core/src/main/ruby/jruby/java/core_ext/kernel.rb
2 changes: 0 additions & 2 deletions core/src/main/java/org/jruby/compiler/JITCompiler.java
Original file line number Diff line number Diff line change
@@ -59,9 +59,7 @@
import java.lang.invoke.MethodType;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.RejectedExecutionException;
35 changes: 23 additions & 12 deletions core/src/main/ruby/jruby/java/core_ext/kernel.rb
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
# frozen-literal-string: true

# Create convenience methods for top-level java packages so we do not need to prefix
# with Java::com. We undef these methods within Package in case we run into 'com.foo.com'.
# Convenience methods for top-level packages without the need to prefix e.g. `Java::java.util.ArrayList`.
# @note These methods are undef-ed within Java package stubs (in case of *com.foo.com*).
module Kernel
# Java package short-cut method.
# @example
# java.lang.System
def java
JavaUtilities.get_package_module_dot_format('java')
JavaUtilities.get_package_module_dot_format('java') # stub
end

# Java package short-cut method.
# @example
# javax.swing.SwingUtilities
def javax
JavaUtilities.get_package_module_dot_format('javax')
JavaUtilities.get_package_module_dot_format('javax') # stub
end

# Java package short-cut method.
# @example
# javafx.application.Platform
def javafx
JavaUtilities.get_package_module_dot_format('javafx')
JavaUtilities.get_package_module_dot_format('javafx') # stub
end

# Java package short-cut method.
# @example
# com.google.common.base.Strings
def com
JavaUtilities.get_package_module_dot_format('com')
JavaUtilities.get_package_module_dot_format('com') # stub
end

# Java package short-cut method.
# @example
# org.json.JSONArray
def org
JavaUtilities.get_package_module_dot_format('org')
JavaUtilities.get_package_module_dot_format('org') # stub
end
end
end if false