Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed broken test with autoload on JRuby #593

Merged
merged 3 commits into from
Feb 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ rvm:
- 2.4.3
- 2.5.0
- ruby-head
- jruby-9.1.15.0
env:
global:
NOBENCHMARK=1
script: rake
matrix:
allow_failures:
- rvm: jruby-9.1.15.0
2 changes: 1 addition & 1 deletion lib/rdoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def self.load_yaml

autoload :Comment, 'rdoc/comment'

autoload :I18n, 'rdoc/i18n'
require 'rdoc/i18n'

# code objects
#
Expand Down
6 changes: 3 additions & 3 deletions lib/rdoc/generator/pot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def extract_messages
extractor.extract
end

autoload :MessageExtractor, 'rdoc/generator/pot/message_extractor'
autoload :PO, 'rdoc/generator/pot/po'
autoload :POEntry, 'rdoc/generator/pot/po_entry'
require 'rdoc/generator/pot/message_extractor'
require 'rdoc/generator/pot/po'
require 'rdoc/generator/pot/po_entry'

end
2 changes: 1 addition & 1 deletion lib/rdoc/i18n.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
module RDoc::I18n

autoload :Locale, 'rdoc/i18n/locale'
autoload :Text, 'rdoc/i18n/text'
require 'rdoc/i18n/text'

end
10 changes: 8 additions & 2 deletions rdoc.gemspec
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
begin
require_relative "lib/rdoc"
rescue LoadError
# for Ruby repository
require_relative "../rdoc"
begin
# for Ruby repository
require_relative "../rdoc"
rescue LoadError
# for JRuby
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
require "rdoc"
end
end

Gem::Specification.new do |s|
Expand Down