Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit a971d7d

Browse files
committed
Suppress bigdecimal circular warning on JRuby 1.7
1 parent bec6638 commit a971d7d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/rspec/support/object_formatter_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ def with_date_loaded
9393
it 'includes a conventional representation of the decimal' do
9494
in_sub_process_if_possible do
9595
require 'bigdecimal'
96+
# Suppress warning on JRuby 1.7:
97+
# file:/Users/me/.rbenv/versions/jruby-1.7.26/lib/jruby.jar!/jruby/bigdecimal.rb:1
98+
# warning: loading in progress, circular require considered harmful - bigdecimal.jar
99+
$stderr.reset!
100+
96101
expect(formatted_decimal).to include('3.3 (#<BigDecimal')
97102
end
98103
end
@@ -136,6 +141,11 @@ def with_delegate_loaded
136141
it 'formats the underlying object normally' do
137142
with_delegate_loaded do
138143
require 'bigdecimal'
144+
# Suppress warning on JRuby 1.7:
145+
# file:/Users/me/.rbenv/versions/jruby-1.7.26/lib/jruby.jar!/jruby/bigdecimal.rb:1
146+
# warning: loading in progress, circular require considered harmful - bigdecimal.jar
147+
$stderr.reset!
148+
139149
expect(ObjectFormatter.format(delegator)).to eq "#<SimpleDelegator(#{formatted_decimal})>"
140150
end
141151
end

0 commit comments

Comments
 (0)