File tree Expand file tree Collapse file tree 1 file changed +18
-20
lines changed
Expand file tree Collapse file tree 1 file changed +18
-20
lines changed Original file line number Diff line number Diff line change 122122 ( Rational ( fixnum_max ) ** -bignum_value )
123123 } . should raise_error ( ArgumentError )
124124 end
125+
126+ it "raises an ArgumentError when self is < -1" do
127+ -> {
128+ ( Rational ( -2 ) ** bignum_value )
129+ } . should raise_error ( ArgumentError )
130+ -> {
131+ ( Rational ( fixnum_min ) ** bignum_value )
132+ } . should raise_error ( ArgumentError )
133+ end
134+
135+ it "raises an ArgumentError when self is < -1 and the exponent is negative" do
136+ -> {
137+ ( Rational ( -2 ) ** -bignum_value )
138+ } . should raise_error ( ArgumentError )
139+ -> {
140+ ( Rational ( fixnum_min ) ** -bignum_value )
141+ } . should raise_error ( ArgumentError )
142+ end
125143 end
126144
127145 # Fails on linux due to pow() bugs in glibc: http://sources.redhat.com/bugzilla/show_bug.cgi?id=3866
148166 } . should complain ( /warning: in a\* \* b, b may be too big/ )
149167 end
150168 end
151-
152- ruby_version_is "3.4" do
153- it "raises an ArgumentError when self < -1" do
154- -> {
155- ( Rational ( -2 ) ** bignum_value )
156- } . should raise_error ( ArgumentError )
157- -> {
158- ( Rational ( fixnum_min ) ** bignum_value )
159- } . should raise_error ( ArgumentError )
160- end
161-
162- it "raises an ArgumentError when self is < -1 and the exponent is negative" do
163- -> {
164- ( Rational ( -2 ) ** -bignum_value )
165- } . should raise_error ( ArgumentError )
166- -> {
167- ( Rational ( fixnum_min ) ** -bignum_value )
168- } . should raise_error ( ArgumentError )
169- end
170- end
171169 end
172170 end
173171
You can’t perform that action at this time.
0 commit comments