Skip to content

Commit 5a6c2ce

Browse files
committed
Constrain rdoc and rbs on JRuby
JRuby 9.4 (equivalent to 3.1) cannot resolve the RBS dependencies specific to Ruby 3.2 and later that are included in rdoc 8. On the other hand, rbs has no java platform gem before 4.1.0.pre.2.
1 parent 3032e38 commit 5a6c2ce

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎Gemfile‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ gemspec
55
group :development do
66
gem "benchmark-driver"
77
gem "rake-compiler"
8-
gem "rdoc"
8+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2")
9+
# rdoc 8 depends on rbs 4, which requires Ruby 3.2 or later.
10+
gem "rdoc", "< 8"
11+
else
12+
gem "rdoc"
13+
# rdoc 8 depends on rbs, which has no java platform gem before 4.1.0.pre.2.
14+
# See https://github.com/ruby/rdoc/issues/1746
15+
gem 'rbs', '>= 4.1.0.pre.2' if RUBY_PLATFORM == 'java'
16+
end
917
gem "ruby-maven", :platforms => :jruby
1018
gem "test-unit"
1119
gem "test-unit-ruby-core"

0 commit comments

Comments
 (0)