Sha256: dc9d423ecf7a03bab719593af74f32278558fa6c57201852a8890e9118007653

Contents?: true

Size: 414 Bytes

Versions: 2

Compression:

Stored size: 414 Bytes

Contents

if JRUBY_VERSION.start_with?('9')
  require 'bindex/jruby_internals_9k'
else
  require 'bindex/jruby_internals'
end

java_import com.gsamokovarov.bindex.SetExceptionBindingsEventHook

begin
  previous_verbose, $VERBOSE = $VERBOSE, nil
  JRuby.runtime.add_event_hook(SetExceptionBindingsEventHook.new)
ensure
  $VERBOSE = previous_verbose
end

::Exception.class_eval do
  def bindings
    @bindings || []
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bindex-0.1.1 lib/bindex/jruby.rb
bindex-0.1.0 lib/bindex/jruby.rb