summaryrefslogtreecommitdiff
path: root/spec/ruby/library/matrix
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-21 01:16:26 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-21 01:19:55 +0900
commit9c73c756244fa27ffa99d81dcc73a4ad14198002 (patch)
tree14b0ea9059b8c31e276531a1df712ead4e158cdb /spec/ruby/library/matrix
parentfb8f011422c645ebe29e94c3fb2079af73d1d35f (diff)
Use Integer instead of Fixnum/Bignum
Diffstat (limited to 'spec/ruby/library/matrix')
-rw-r--r--spec/ruby/library/matrix/coerce_spec.rb2
-rw-r--r--spec/ruby/library/matrix/divide_spec.rb4
-rw-r--r--spec/ruby/library/matrix/hash_spec.rb4
-rw-r--r--spec/ruby/library/matrix/multiply_spec.rb4
4 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/library/matrix/coerce_spec.rb b/spec/ruby/library/matrix/coerce_spec.rb
index 280243d372..4022f00236 100644
--- a/spec/ruby/library/matrix/coerce_spec.rb
+++ b/spec/ruby/library/matrix/coerce_spec.rb
@@ -2,7 +2,7 @@ require_relative '../../spec_helper'
require 'matrix'
describe "Matrix#coerce" do
- it "allows the division of fixnum by a Matrix " do
+ it "allows the division of integer by a Matrix " do
(1/Matrix[[0,1],[-1,0]]).should == Matrix[[0,-1],[1,0]]
end
end
diff --git a/spec/ruby/library/matrix/divide_spec.rb b/spec/ruby/library/matrix/divide_spec.rb
index 2e3bb85bf6..84cecff582 100644
--- a/spec/ruby/library/matrix/divide_spec.rb
+++ b/spec/ruby/library/matrix/divide_spec.rb
@@ -16,11 +16,11 @@ describe "Matrix#/" do
# Guard against the Mathn library
guard -> { !defined?(Math.rsqrt) } do
- it "returns the result of dividing self by a Fixnum" do
+ it "returns the result of dividing self by an Integer" do
(@a / 2).should == Matrix[ [0, 1], [1, 2] ]
end
- it "returns the result of dividing self by a Bignum" do
+ it "returns the result of dividing self by an Integer" do
(@a / bignum_value).should == Matrix[ [0, 0], [0, 0] ]
end
end
diff --git a/spec/ruby/library/matrix/hash_spec.rb b/spec/ruby/library/matrix/hash_spec.rb
index fac9a06527..7dabcd3737 100644
--- a/spec/ruby/library/matrix/hash_spec.rb
+++ b/spec/ruby/library/matrix/hash_spec.rb
@@ -3,8 +3,8 @@ require 'matrix'
describe "Matrix#hash" do
- it "returns a Fixnum" do
- Matrix[ [1,2] ].hash.should be_an_instance_of(Fixnum)
+ it "returns an Integer" do
+ Matrix[ [1,2] ].hash.should be_an_instance_of(Integer)
end
it "returns the same value for the same matrix" do
diff --git a/spec/ruby/library/matrix/multiply_spec.rb b/spec/ruby/library/matrix/multiply_spec.rb
index 585f268931..e488bb0f5d 100644
--- a/spec/ruby/library/matrix/multiply_spec.rb
+++ b/spec/ruby/library/matrix/multiply_spec.rb
@@ -16,11 +16,11 @@ describe "Matrix#*" do
(@a * Vector[1,2]).should == Vector[5, 11]
end
- it "returns the result of multiplying the elements of self and a Fixnum" do
+ it "returns the result of multiplying the elements of self and an Integer" do
(@a * 2).should == Matrix[ [2, 4], [6, 8] ]
end
- it "returns the result of multiplying the elements of self and a Bignum" do
+ it "returns the result of multiplying the elements of self and an Integer" do
(@a * bignum_value).should == Matrix[
[9223372036854775808, 18446744073709551616],
[27670116110564327424, 36893488147419103232]