Skip to content

1.7.26 regression: NoMethodError: private method `require' called for Kernel:Module in Sequel #4155

@perlun

Description

@perlun

Something has gone broken in JRuby 1.7.26, causing the error below.

$ bundle exec irb
The signal IOT is in use by the JVM and will not work correctly on this platform
The signal CLD is in use by the JVM and will not work correctly on this platform
The signal EXIT is in use by the JVM and will not work correctly on this platform
jruby-1.7.26 :001 > require 'sequel'
 => true
jruby-1.7.26 :002 > Sequel.extension :core_extensions
NoMethodError: private method `require' called for Kernel:Module
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/sequel-4.38.0/lib/sequel/core.rb:139:in `extension'
    from org/jruby/RubyArray.java:1613:in `each'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/sequel-4.38.0/lib/sequel/core.rb:139:in `extension'
    from (irb):2:in `evaluate'
    from org/jruby/RubyKernel.java:1079:in `eval'
    from org/jruby/RubyKernel.java:1479:in `loop'
    from org/jruby/RubyKernel.java:1242:in `catch'
    from org/jruby/RubyKernel.java:1242:in `catch'
    from /Users/plundberg/.rvm/rubies/jruby-1.7.26/bin/irb:13:in `(root)'
    from org/jruby/RubyKernel.java:1059:in `load'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:1:in `(root)'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/cli/exec.rb:27:in `run'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/cli.rb:332:in `exec'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/cli.rb:20:in `dispatch'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/cli.rb:11:in `start'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/exe/bundle:34:in `(root)'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
    from org/jruby/RubyKernel.java:1059:in `load'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/gems/bundler-1.13.1/exe/bundle:26:in `(root)'
    from org/jruby/RubyKernel.java:1079:in `eval'
    from /Users/plundberg/.rvm/gems/jruby-1.7.26/bin/bundle:1:in `(root)'jruby-1.7.26 :003 > quit

When I switch to JRuby 1.7.25, all is fine:

$ rvm use 1.7.25
Using /Users/plundberg/.rvm/gems/jruby-1.7.25
$ bundle exec irb
jruby-1.7.25 :001 > require 'sequel'
 => true
jruby-1.7.25 :002 > Sequel.extension :core_extensions
 => [:core_extensions]
jruby-1.7.25 :003 > quit

The failing code (https://github.com/jeremyevans/sequel/blob/master/lib/sequel/core.rb#L139) looks like this:

  def self.extension(*extensions)
    extensions.each{|e| Kernel.require "sequel/extensions/#{e}"}
end

Any ideas or suggestions on what change in 1.7.26 could have been causing this?

/cc @olleolleolle, @sdahlbac

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions