File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
src/main/ruby/truffleruby/core Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
fails:Public methods on Array should include all?
2
2
fails:Public methods on Array should include none?
3
3
fails:Public methods on Array should include one?
4
- fails:Public methods on Complex should include to_c
5
- fails:Public methods on Complex should not include divide
6
- fails:Public methods on Complex should not include marshal_load
7
4
fails:Public methods on File should include birthtime
8
5
fails:Public methods on File should not include inspect
9
6
fails:Public methods on File should not include stat
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ def *(other)
159
159
end
160
160
end
161
161
162
- def divide ( other )
162
+ def / ( other )
163
163
if other . kind_of? ( Complex )
164
164
self * other . conjugate / other . abs2
165
165
elsif other . kind_of? ( Numeric ) && other . real?
@@ -168,8 +168,7 @@ def divide(other)
168
168
redo_coerced ( :quo , other )
169
169
end
170
170
end
171
- alias_method :/ , :divide
172
- alias_method :quo , :divide
171
+ alias_method :quo , :/
173
172
174
173
def ** ( other )
175
174
if !other . kind_of? ( Float ) && other == 0
@@ -290,6 +289,10 @@ def rect
290
289
end
291
290
alias_method :rectangular , :rect
292
291
292
+ def to_c
293
+ self
294
+ end
295
+
293
296
def to_f
294
297
raise RangeError , "can't convert #{ self } into Float" unless !imag . kind_of? ( Float ) && imag == 0
295
298
real . to_f
@@ -372,6 +375,7 @@ def marshal_load(ary)
372
375
end
373
376
self
374
377
end
378
+ private :marshal_load
375
379
376
380
def <=>( other )
377
381
if imag == 0 && other . kind_of? ( Numeric )
You can’t perform that action at this time.
0 commit comments