Skip to content

Commit 784755f

Browse files
committed
[test] use blessed way of loading an extension
1 parent 1d9767b commit 784755f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/spec/ruby/spec_helper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
require 'rspec'
2323

24-
require 'jruby'; ext_class = org.jruby.rack.ext.RackLibrary
25-
JRuby.runtime.loadExtension 'JRuby::Rack', ext_class.new, true
24+
require 'jruby' # we rely on JRuby.runtime in a few places
25+
JRuby::Util.load_ext('org.jruby.rack.ext.RackLibrary')
2626

2727
module SharedHelpers
2828

@@ -170,7 +170,7 @@ def should_not_eval_as_nil(code, runtime = @runtime) # alias
170170
rescue LoadError
171171
end
172172

173-
# current 'library' environment (based on appraisals) e.g. :rails32
173+
# current 'library' environment (based on appraisals) e.g. :rails72
174174
CURRENT_LIB = defined?(Rails::VERSION) ?
175175
:"rails#{Rails::VERSION::MAJOR}#{Rails::VERSION::MINOR}" : :stub
176176

0 commit comments

Comments
 (0)