1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use Integer instead of Fixnum/Bignum

This commit is contained in:
Nobuyoshi Nakada 2020-12-21 01:16:26 +09:00
parent fb8f011422
commit 9c73c75624
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
144 changed files with 392 additions and 390 deletions

View file

@ -28,18 +28,18 @@ describe :file_world_readable, shared: true do
end
end
# We don't specify what the Fixnum is because it's system dependent
it "returns a Fixnum if the file is chmod 644" do
# We don't specify what the Integer is because it's system dependent
it "returns an Integer if the file is chmod 644" do
File.chmod(0644, @file)
@object.world_readable?(@file).should be_an_instance_of(Fixnum)
@object.world_readable?(@file).should be_an_instance_of(Integer)
end
it "returns a Fixnum if the file is a directory and chmod 644" do
it "returns an Integer if the file is a directory and chmod 644" do
dir = tmp(rand().to_s + '-ww')
Dir.mkdir(dir)
Dir.should.exist?(dir)
File.chmod(0644, dir)
@object.world_readable?(dir).should be_an_instance_of(Fixnum)
@object.world_readable?(dir).should be_an_instance_of(Integer)
Dir.rmdir(dir)
end

View file

@ -27,18 +27,18 @@ describe :file_world_writable, shared: true do
@object.world_writable?(@file).should be_nil
end
# We don't specify what the Fixnum is because it's system dependent
it "returns a Fixnum if the file is chmod 777" do
# We don't specify what the Integer is because it's system dependent
it "returns an Integer if the file is chmod 777" do
File.chmod(0777, @file)
@object.world_writable?(@file).should be_an_instance_of(Fixnum)
@object.world_writable?(@file).should be_an_instance_of(Integer)
end
it "returns a Fixnum if the file is a directory and chmod 777" do
it "returns an Integer if the file is a directory and chmod 777" do
dir = tmp(rand().to_s + '-ww')
Dir.mkdir(dir)
Dir.should.exist?(dir)
File.chmod(0777, dir)
@object.world_writable?(dir).should be_an_instance_of(Fixnum)
@object.world_writable?(dir).should be_an_instance_of(Integer)
Dir.rmdir(dir)
end
end