File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7171 psych (4.0.6 )
7272 stringio
7373 public_suffix (6.0.0 )
74- raap (0.8 .0 )
74+ raap (0.10 .0 )
7575 rbs (~> 3.0 )
7676 timeout (~> 0.4 )
7777 racc (1.8.0 )
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ task :typecheck_test => :compile do
106106end
107107
108108task :raap => :compile do
109- sh %q[cat test/raap.txt | egrep -v '^#|^$' | xargs bundle exec raap]
109+ sh %q[cat test/raap.txt | egrep -v '^#|^$' | xargs bundle exec raap --require bigdecimal/util --library bigdecimal ]
110110end
111111
112112task :rubocop do
Original file line number Diff line number Diff line change @@ -134,7 +134,10 @@ class Complex < Numeric
134134 # Complex('i') ** 2 # => (-1+0i)
135135 # Complex(-8) ** Rational(1, 3) # => (1.0000000000000002+1.7320508075688772i)
136136 #
137- def ** : (Numeric) -> Complex
137+ def ** : (Integer) -> Complex
138+ | (Float) -> Complex
139+ | (Rational) -> Complex
140+ | (Complex) -> Complex
138141
139142 # <!--
140143 # rdoc-file=complex.c
Original file line number Diff line number Diff line change @@ -142,8 +142,10 @@ class Float < Numeric
142142 # f ** Rational(2, 1) # => 9.8596
143143 # f ** Complex(2, 0) # => (9.8596+0i)
144144 #
145- def ** : (Complex) -> Complex
146- | (Numeric) -> Float
145+ def ** : (Integer) -> Float
146+ | (Float) -> (Float | Complex)
147+ | (Rational) -> (Float | Complex)
148+ | (Complex) -> Complex
147149
148150 # <!--
149151 # rdoc-file=numeric.c
Original file line number Diff line number Diff line change @@ -230,9 +230,9 @@ class Integer < Numeric
230230 # 2 ** Rational(3, 1) # => (8/1)
231231 # 2 ** Complex(3, 0) # => (8+0i)
232232 #
233- def ** : (Integer) -> Numeric
234- | (Float) -> Numeric
235- | (Rational) -> Numeric
233+ def ** : (Integer) -> (Integer | Rational)
234+ | (Float) -> (Float | Complex)
235+ | (Rational) -> (Rational | Float | Complex)
236236 | (Complex) -> Complex
237237
238238 # <!--
Original file line number Diff line number Diff line change @@ -84,8 +84,10 @@ class Rational < Numeric
8484 # Rational(1, 2) ** 0 #=> (1/1)
8585 # Rational(1, 2) ** 0.0 #=> 1.0
8686 #
87- def ** : (Complex) -> Complex
88- | (Numeric) -> Numeric
87+ def ** : (Integer) -> Rational
88+ | (Float) -> (Float | Complex)
89+ | (Rational) -> (Float | Rational | Complex)
90+ | (Complex) -> (Rational | Complex)
8991
9092 # <!--
9193 # rdoc-file=rational.c
Original file line number Diff line number Diff line change @@ -441,7 +441,10 @@ class BigDecimal < Numeric
441441 #
442442 # Related: BigDecimal#power.
443443 #
444- def ** : (Numeric) -> BigDecimal
444+ def ** : (Integer) -> BigDecimal
445+ | (Float) -> (Integer | BigDecimal)
446+ | (Rational) -> (Integer | BigDecimal)
447+ | (BigDecimal) -> BigDecimal
445448
446449 # <!--
447450 # rdoc-file=ext/bigdecimal/bigdecimal.c
Original file line number Diff line number Diff line change 44
55Set[Integer]
66Enumerable[Integer]#to_set
7+ Integer#**
8+ Float#**
9+ Rational#**
10+ Complex#**
11+ BigDecimal#**
You can’t perform that action at this time.
0 commit comments