Skip to content

Commit

Permalink
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/ruby/jruby/jruby.rb
Original file line number Diff line number Diff line change
@@ -42,6 +42,12 @@ def with_current_runtime_as_global
end
end

# Change the current threads context classloader. By, default call
# with no arguments to replace it with JRuby's class loader.
def set_context_class_loader(loader = JRuby.runtime.jruby_class_loader)
java.lang.Thread.currentThread.setContextClassLoader loader
end

# Parse the given block or the provided content, returning a JRuby AST node.
def parse(content = nil, filename = (default_filename = true; '-'), extra_position_info = false, lineno = 0, &block)
if block

0 comments on commit c61f2bb

Please sign in to comment.