-
-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into truffle-yaml
- 9.4.12.0
- 9.4.11.0
- 9.4.10.0
- 9.4.9.0
- 9.4.8.0
- 9.4.7.0
- 9.4.6.0
- 9.4.5.0
- 9.4.4.0
- 9.4.3.0
- 9.4.2.0
- 9.4.1.0
- 9.4.0.0
- 9.3.15.0
- 9.3.14.0
- 9.3.13.0
- 9.3.12.0
- 9.3.11.0
- 9.3.10.0
- 9.3.9.0
- 9.3.8.0
- 9.3.7.0
- 9.3.6.0
- 9.3.5.0
- 9.3.4.0
- 9.3.3.0
- 9.3.2.0
- 9.3.1.0
- 9.3.0.0
- 9.2.21.0
- 9.2.20.1
- 9.2.20.0
- 9.2.19.0
- 9.2.18.0
- 9.2.17.0
- 9.2.16.0
- 9.2.15.0
- 9.2.14.0
- 9.2.13.0
- 9.2.12.0
- 9.2.11.1
- 9.2.11.0
- 9.2.10.0
- 9.2.9.0
- 9.2.8.0
- 9.2.7.0
- 9.2.6.0
- 9.2.5.0
- 9.2.4.1
- 9.2.4.0
- 9.2.3.0
- 9.2.2.0
- 9.2.1.0
- 9.2.0.0
- 9.1.17.0
- 9.1.16.0
- 9.1.15.0
- 9.1.14.0
- 9.1.13.0
- 9.1.12.0
- 9.1.11.0
- 9.1.10.0
- 9.1.9.0
- 9.1.8.0
- 9.1.7.0
- 9.1.6.0
- 9.1.5.0
- 9.1.4.0
- 9.1.3.0
- 9.1.2.0
- 9.1.1.0
- 9.1.0.0
- 9.0.5.0
- 9.0.4.0
- 9.0.3.0
Showing
139 changed files
with
1,362 additions
and
598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ | |
describe Object, "#new_fd" do | ||
before :each do | ||
@name = tmp("io_specs") | ||
@io = nil | ||
end | ||
|
||
after :each do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../../../shared/basicobject/send', __FILE__) | ||
|
||
describe "BasicObject#__send__" do | ||
it "is a public instance method" do | ||
BasicObject.should have_public_instance_method(:__send__) | ||
end | ||
|
||
it_behaves_like(:basicobject_send, :__send__) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
|
||
ruby_version_is "2.2" do | ||
describe "Binding#local_variables" do | ||
it "returns an Array" do | ||
binding.local_variables.should be_kind_of(Array) | ||
end | ||
|
||
it "includes local variables in the current scope" do | ||
a = 1 | ||
b = nil | ||
binding.local_variables.should == [:a, :b] | ||
end | ||
|
||
it "includes local variables defined after calling binding.local_variables" do | ||
binding.local_variables.should == [:a, :b] | ||
a = 1 | ||
b = 2 | ||
end | ||
|
||
it "includes local variables of inherited scopes and eval'ed context" do | ||
p = proc { |a| b = 1; eval("c = 2; binding.local_variables") } | ||
p.call.should == [:c, :a, :b, :p] | ||
end | ||
|
||
it "includes shadowed local variables only once" do | ||
a = 1 | ||
proc { |a| binding.local_variables }.call(2).should == [:a] | ||
end | ||
|
||
it "includes new variables defined in the binding" do | ||
b = binding | ||
b.local_variable_set :a, 42 | ||
b.local_variables.should == [:a, :b] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../fixtures/classes', __FILE__) | ||
|
||
ruby_version_is "2.2" do | ||
describe "Binding#receiver" do | ||
it "returns the object to which binding is bound" do | ||
obj = BindingSpecs::Demo.new(1) | ||
obj.get_binding.receiver.should == obj | ||
|
||
binding.receiver.should == self | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../fixtures/classes', __FILE__) | ||
|
||
ruby_version_is "2.2" do | ||
describe "Enumerable#slice_after" do | ||
before :each do | ||
@enum = EnumerableSpecs::Numerous.new(7, 6, 5, 4, 3, 2, 1) | ||
end | ||
|
||
describe "when given an argument and no block" do | ||
it "calls === on the argument to determine when to yield" do | ||
arg = mock("filter") | ||
arg.should_receive(:===).and_return(false, true, false, false, false, true, false) | ||
e = @enum.slice_after(arg) | ||
e.should be_an_instance_of(enumerator_class) | ||
e.to_a.should == [[7, 6], [5, 4, 3, 2], [1]] | ||
end | ||
|
||
it "doesn't yield an empty array if the filter matches the first entry or the last entry" do | ||
arg = mock("filter") | ||
arg.should_receive(:===).and_return(true).exactly(7) | ||
e = @enum.slice_after(arg) | ||
e.to_a.should == [[7], [6], [5], [4], [3], [2], [1]] | ||
end | ||
|
||
it "uses standard boolean as a test" do | ||
arg = mock("filter") | ||
arg.should_receive(:===).and_return(false, :foo, nil, false, false, 42, false) | ||
e = @enum.slice_after(arg) | ||
e.to_a.should == [[7, 6], [5, 4, 3, 2], [1]] | ||
end | ||
end | ||
|
||
describe "when given a block" do | ||
describe "and no argument" do | ||
it "calls the block to determine when to yield" do | ||
e = @enum.slice_after{ |i| i == 6 || i == 2 } | ||
e.should be_an_instance_of(enumerator_class) | ||
e.to_a.should == [[7, 6], [5, 4, 3, 2], [1]] | ||
end | ||
end | ||
|
||
describe "and an argument" do | ||
it "raises an ArgumentError" do | ||
lambda { @enum.slice_after(42) { |i| i == 6 } }.should raise_error(ArgumentError) | ||
end | ||
end | ||
end | ||
|
||
it "raises an ArgumentError when given an incorrect number of arguments" do | ||
lambda { @enum.slice_after("one", "two") }.should raise_error(ArgumentError) | ||
lambda { @enum.slice_after }.should raise_error(ArgumentError) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../fixtures/classes', __FILE__) | ||
|
||
ruby_version_is "2.2" do | ||
describe "Enumerable#slice_when" do | ||
before :each do | ||
ary = [10, 9, 7, 6, 4, 3, 2, 1] | ||
@enum = EnumerableSpecs::Numerous.new *ary | ||
@result = @enum.slice_when { |i, j| i - 1 != j } | ||
@enum_length = ary.length | ||
end | ||
|
||
context "when given a block" do | ||
it "returns an enumerator" do | ||
@result.should be_an_instance_of(enumerator_class) | ||
end | ||
|
||
it "splits chunks between adjacent elements i and j where the block returns true" do | ||
@result.to_a.should == [[10, 9], [7, 6], [4, 3, 2, 1]] | ||
end | ||
|
||
it "calls the block for length of the receiver enumerable minus one times" do | ||
times_called = 0 | ||
@enum.slice_when do |i, j| | ||
times_called += 1 | ||
i - 1 != j | ||
end.to_a | ||
times_called.should == (@enum_length - 1) | ||
end | ||
end | ||
|
||
context "when not given a block" do | ||
it "raises an ArgumentError" do | ||
lambda { @enum.slice_when }.should raise_error(ArgumentError) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
|
||
ruby_version_is "2.2" do | ||
describe "File.birthtime" do | ||
before :each do | ||
@file = __FILE__ | ||
end | ||
|
||
after :each do | ||
@file = nil | ||
end | ||
|
||
platform_is :windows, :darwin do | ||
it "returns the birth time for the named file as a Time object" do | ||
File.birthtime(@file) | ||
File.birthtime(@file).should be_kind_of(Time) | ||
end | ||
|
||
it "accepts an object that has a #to_path method" do | ||
File.birthtime(mock_to_path(@file)) | ||
end | ||
|
||
it "raises an Errno::ENOENT exception if the file is not found" do | ||
lambda { File.birthtime('bogus') }.should raise_error(Errno::ENOENT) | ||
end | ||
end | ||
|
||
platform_is :linux, :openbsd, :freebsd, :netbsd do | ||
it "raises an NotImplementedError" do | ||
lambda { File.birthtime(@file) }.should raise_error(NotImplementedError) | ||
end | ||
end | ||
end | ||
end | ||
|
||
ruby_version_is "2.2" do | ||
describe "File#birthtime" do | ||
before :each do | ||
@file = File.open(__FILE__) | ||
end | ||
|
||
after :each do | ||
@file.close | ||
@file = nil | ||
end | ||
|
||
platform_is :windows, :darwin do | ||
it "returns the birth time for self" do | ||
@file.birthtime | ||
@file.birthtime.should be_kind_of(Time) | ||
end | ||
end | ||
|
||
platform_is :linux, :openbsd, :freebsd, :netbsd do | ||
it "raises an NotImplementedError" do | ||
lambda { @file.birthtime }.should raise_error(NotImplementedError) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
@file = File.open(__FILE__) | ||
end | ||
|
||
after:each do | ||
after :each do | ||
@file.close | ||
@file = nil | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require File.expand_path('../../../../spec_helper', __FILE__) | ||
|
||
ruby_version_is "2.2" do | ||
describe "File::Stat#birthtime" do | ||
before :each do | ||
@file = tmp('i_exist') | ||
touch(@file) { |f| f.write "rubinius" } | ||
end | ||
|
||
after :each do | ||
rm_r @file | ||
end | ||
|
||
platform_is :windows, :darwin do | ||
it "returns the birthtime of a File::Stat object" do | ||
st = File.stat(@file) | ||
st.birthtime.should be_kind_of(Time) | ||
st.birthtime.should <= Time.now | ||
end | ||
end | ||
|
||
platform_is :linux, :openbsd, :freebsd, :netbsd do | ||
it "raises an NotImplementedError" do | ||
st = File.stat(@file) | ||
lambda { st.birthtime }.should raise_error(NotImplementedError) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
|
||
describe "Float#CONSTANTS" do | ||
specify "the DIG value is 15" do | ||
describe "Float constant" do | ||
it "DIG is 15" do | ||
Float::DIG.should == 15 | ||
end | ||
|
||
it "the EPSILON value is" do | ||
it "EPSILON is" do | ||
Float::EPSILON.should == eval("0.0000000000000002220446049250313080847263336181640625") | ||
end | ||
|
||
it "the MANT_DIG is 53" do | ||
it "MANT_DIG is 53" do | ||
Float::MANT_DIG.should == 53 | ||
end | ||
|
||
it "the MAX_10_EXP is 308" do | ||
it "MAX_10_EXP is 308" do | ||
Float::MAX_10_EXP.should == 308 | ||
end | ||
|
||
it "the MIN_10_EXP is -308" do | ||
it "MIN_10_EXP is -308" do | ||
Float::MIN_10_EXP.should == -307 | ||
end | ||
|
||
it "the MAX_EXP is 1024" do | ||
it "MAX_EXP is 1024" do | ||
Float::MAX_EXP.should == 1024 | ||
end | ||
|
||
it "the MIN_EXP is -1021" do | ||
it "MIN_EXP is -1021" do | ||
Float::MIN_EXP.should == -1021 | ||
end | ||
|
||
it "the MAX is 1.79769313486232e+308" do | ||
it "MAX is 1.79769313486232e+308" do | ||
Float::MAX.should == eval("179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0") | ||
end | ||
|
||
not_compliant_on :jruby do | ||
it "the MIN is 2.2250738585072e-308" do | ||
it "MIN is 2.2250738585072e-308" do | ||
Float::MIN.should == eval("2.225073858507201383090232717332404064219215980462331830553327416887204434813918195854283159012511020564067339731035811005152434161553460108856012385377718821130777993532002330479610147442583636071921565046942503734208375250806650616658158948720491179968591639648500635908770118304874799780887753749949451580451605050915399856582470818645113537935804992115981085766051992433352114352390148795699609591288891602992641511063466313393663477586513029371762047325631781485664350872122828637642044846811407613911477062801689853244110024161447421618567166150540154285084716752901903161322778896729707373123334086988983175067838846926092773977972858659654941091369095406136467568702398678315290680984617210924625396728515625e-308") | ||
end | ||
end | ||
|
||
# TODO: Does this actually constitute noncompliance? | ||
deviates_on :jruby do | ||
it "the MIN is 4.9e-324" do | ||
it "MIN is 4.9e-324" do | ||
Float::MIN.should == 4.9e-324 | ||
end | ||
end | ||
|
||
it "the RADIX is 2" do | ||
it "RADIX is 2" do | ||
Float::RADIX.should == 2 | ||
end | ||
|
||
it "the INFINITY is the positive infinity" do | ||
it "INFINITY is the positive infinity" do | ||
Float::INFINITY.infinite?.should == 1 | ||
end | ||
|
||
it "the NAN is 'not a number'" do | ||
it "NAN is 'not a number'" do | ||
Float::NAN.nan?.should be_true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
|
||
ruby_version_is "2.2" do | ||
describe "Float#next_float" do | ||
it "returns a float the smallest possible step greater than the receiver" do | ||
barely_positive = 0.0.next_float | ||
barely_positive.should == 0.0.next_float | ||
|
||
barely_positive.should > 0.0 | ||
barely_positive.should < barely_positive.next_float | ||
|
||
midpoint = barely_positive / 2 | ||
[0.0, barely_positive].should include midpoint | ||
end | ||
|
||
it "steps directly between MAX and INFINITY" do | ||
(-Float::INFINITY).next_float.should == -Float::MAX | ||
Float::MAX.next_float.should == Float::INFINITY | ||
end | ||
|
||
it "steps directly between 1.0 and 1.0 + EPSILON" do | ||
1.0.next_float.should == 1.0 + Float::EPSILON | ||
end | ||
|
||
it "steps directly between -1.0 and -1.0 + EPSILON/2" do | ||
(-1.0).next_float.should == -1.0 + Float::EPSILON/2 | ||
end | ||
|
||
it "reverses the effect of prev_float" do | ||
num = rand | ||
num.prev_float.next_float.should == num | ||
end | ||
|
||
it "returns negative zero when stepping upward from just below zero" do | ||
x = 0.0.prev_float.next_float | ||
(1/x).should == -Float::INFINITY | ||
x = (-0.0).prev_float.next_float | ||
(1/x).should == -Float::INFINITY | ||
x.next_float.should > 0 | ||
end | ||
|
||
it "returns NAN if NAN was the receiver" do | ||
Float::NAN.next_float.nan?.should == true | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
|
||
ruby_version_is "2.2" do | ||
describe "Float#prev_float" do | ||
it "returns a float the smallest possible step smaller than the receiver" do | ||
barely_negative = 0.0.prev_float | ||
barely_negative.should == 0.0.prev_float | ||
|
||
barely_negative.should < 0.0 | ||
barely_negative.should > barely_negative.prev_float | ||
|
||
midpoint = barely_negative / 2 | ||
[0.0, barely_negative].should include midpoint | ||
end | ||
|
||
it "steps directly between MAX and INFINITY" do | ||
Float::INFINITY.prev_float.should == Float::MAX | ||
(-Float::MAX).prev_float.should == -Float::INFINITY | ||
end | ||
|
||
it "steps directly between 1.0 and 1.0 - EPSILON/2" do | ||
1.0.prev_float.should == 1.0 - Float::EPSILON/2 | ||
end | ||
|
||
it "steps directly between -1.0 and -1.0 - EPSILON" do | ||
(-1.0).prev_float.should == -1.0 - Float::EPSILON | ||
end | ||
|
||
it "reverses the effect of next_float" do | ||
num = rand | ||
num.next_float.prev_float.should == num | ||
end | ||
|
||
it "returns positive zero when stepping downward from just above zero" do | ||
x = 0.0.next_float.prev_float | ||
(1/x).should == Float::INFINITY | ||
x = (-0.0).next_float.prev_float | ||
(1/x).should == Float::INFINITY | ||
x.prev_float.should < 0 | ||
end | ||
|
||
it "returns NAN if NAN was the receiver" do | ||
Float::NAN.prev_float.nan?.should == true | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Object.freeze | ||
|
||
begin | ||
autoload :ANY_CONSTANT, "no_autoload.rb" | ||
rescue Exception => e | ||
print e.class, " - ", defined?(ANY_CONSTANT).inspect | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../fixtures/classes', __FILE__) | ||
|
||
ruby_version_is "2.2" do | ||
describe "Method#curry" do | ||
it "returns a curried proc" do | ||
x = Object.new | ||
def x.foo(a,b,c); [a,b,c]; end | ||
|
||
c = x.method(:foo).curry | ||
c.should be_kind_of(Proc) | ||
c.(1).(2, 3).should == [1,2,3] | ||
end | ||
|
||
describe "with optional arity argument" do | ||
before(:each) do | ||
@obj = MethodSpecs::Methods.new | ||
end | ||
|
||
it "returns a curried proc when given correct arity" do | ||
@obj.method(:one_req).curry(1).should be_kind_of(Proc) | ||
@obj.method(:zero_with_splat).curry(100).should be_kind_of(Proc) | ||
@obj.method(:two_req_with_splat).curry(2).should be_kind_of(Proc) | ||
end | ||
|
||
it "raises ArgumentError when the method requires less arguments than the given arity" do | ||
lambda { @obj.method(:zero).curry(1) }.should raise_error(ArgumentError) | ||
lambda { @obj.method(:one_req_one_opt).curry(3) }.should raise_error(ArgumentError) | ||
lambda { @obj.method(:two_req_one_opt_with_block).curry(4) }.should raise_error(ArgumentError) | ||
end | ||
|
||
it "raises ArgumentError when the method requires more arguments than the given arity" do | ||
lambda { @obj.method(:two_req_with_splat).curry(1) }.should raise_error(ArgumentError) | ||
lambda { @obj.method(:one_req).curry(0) }.should raise_error(ArgumentError) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../fixtures/classes', __FILE__) | ||
|
||
describe "Method#super_method" do | ||
ruby_version_is "2.2" do | ||
it "returns the method that would be called by super in the method" do | ||
obj = MethodSpecs::C.new | ||
obj.extend MethodSpecs::OverrideAgain | ||
meth = obj.method(:overridden) | ||
|
||
s_meth = meth.super_method | ||
s_meth.owner.should == MethodSpecs::C | ||
s_meth.receiver.should == obj | ||
s_meth.name.should == :overridden | ||
|
||
ss_meth = meth.super_method.super_method | ||
ss_meth.owner.should == MethodSpecs::BetweenBAndC | ||
ss_meth.receiver.should == obj | ||
ss_meth.name.should == :overridden | ||
|
||
sss_meth = meth.super_method.super_method.super_method | ||
sss_meth.owner.should == MethodSpecs::B | ||
sss_meth.receiver.should == obj | ||
sss_meth.name.should == :overridden | ||
end | ||
|
||
it "returns nil when there's no super method in the parent" do | ||
method = Object.new.method(:method) | ||
method.super_method.should == nil | ||
end | ||
|
||
it "returns nil when the parent's method is removed" do | ||
object = MethodSpecs::B.new | ||
method = object.method(:overridden) | ||
|
||
MethodSpecs::A.class_eval { undef :overridden } | ||
|
||
method.super_method.should == nil | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
|
||
ruby_version_is "2.1" do | ||
describe "Module#singleton_class?" do | ||
it "returns true for singleton classes" do | ||
xs = self.singleton_class | ||
xs.singleton_class?.should == true | ||
end | ||
|
||
it "returns false for other classes" do | ||
c = Class.new | ||
c.singleton_class?.should == false | ||
end | ||
|
||
describe "with singleton values" do | ||
it "returns false for nil's singleton class" do | ||
NilClass.singleton_class?.should == false | ||
end | ||
|
||
it "returns false for true's singleton class" do | ||
TrueClass.singleton_class?.should == false | ||
end | ||
|
||
it "returns false for false's singleton class" do | ||
FalseClass.singleton_class?.should == false | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../fixtures/classes', __FILE__) | ||
|
||
describe "UnboundMethod#super_method" do | ||
ruby_version_is "2.2" do | ||
it "returns the method that would be called by super in the method" do | ||
meth = UnboundMethodSpecs::C.instance_method(:overridden) | ||
meth = meth.super_method | ||
meth.should == UnboundMethodSpecs::B.instance_method(:overridden) | ||
meth = meth.super_method | ||
meth.should == UnboundMethodSpecs::A.instance_method(:overridden) | ||
end | ||
|
||
it "returns nil when there's no super method in the parent" do | ||
method = Object.instance_method(:method) | ||
method.super_method.should == nil | ||
end | ||
|
||
it "returns nil when the parent's method is removed" do | ||
object = UnboundMethodSpecs::B | ||
method = object.instance_method(:overridden) | ||
|
||
UnboundMethodSpecs::A.class_eval { undef :overridden } | ||
|
||
method.super_method.should == nil | ||
end | ||
end | ||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require File.expand_path('../../../shared/continuation/new', __FILE__) | ||
|
||
with_feature :continuation_library do | ||
require 'continuation' | ||
|
||
describe "Continuation.new" do | ||
it_behaves_like :continuation_new, :new | ||
it "raises a NoMethodError" do | ||
lambda { Continuation.new }.should raise_error(NoMethodError) | ||
end | ||
end | ||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require File.expand_path('../../../spec_helper', __FILE__) | ||
require 'pp' | ||
|
||
describe "PP.pp" do | ||
it 'works with default arguments' do | ||
array = [1, 2, 3] | ||
|
||
lambda { | ||
PP.pp array | ||
}.should output "[1, 2, 3]\n" | ||
end | ||
|
||
it 'allows specifying out explicitly' do | ||
array = [1, 2, 3] | ||
other_out = IOStub.new | ||
|
||
lambda { | ||
PP.pp array, other_out | ||
}.should output "" # no output on stdout | ||
|
||
other_out.to_s.should == "[1, 2, 3]\n" | ||
end | ||
|
||
it "needs to be reviewed for spec completeness" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
module SendSpecs | ||
end | ||
|
||
describe :basicobject_send, shared: true do | ||
it "invokes the named method" do | ||
class SendSpecs::Foo | ||
def bar | ||
'done' | ||
end | ||
end | ||
SendSpecs::Foo.new.send(@method, :bar).should == 'done' | ||
end | ||
|
||
it "accepts a String method name" do | ||
class SendSpecs::Foo | ||
def bar | ||
'done' | ||
end | ||
end | ||
SendSpecs::Foo.new.send(@method, 'bar').should == 'done' | ||
end | ||
|
||
it "invokes a class method if called on a class" do | ||
class SendSpecs::Foo | ||
def self.bar | ||
'done' | ||
end | ||
end | ||
SendSpecs::Foo.send(@method, :bar).should == 'done' | ||
end | ||
|
||
it "raises a NameError if the corresponding method can't be found" do | ||
class SendSpecs::Foo | ||
def bar | ||
'done' | ||
end | ||
end | ||
lambda { SendSpecs::Foo.new.send(@method, :syegsywhwua) }.should raise_error(NameError) | ||
end | ||
|
||
it "raises a NameError if the corresponding singleton method can't be found" do | ||
class SendSpecs::Foo | ||
def self.bar | ||
'done' | ||
end | ||
end | ||
lambda { SendSpecs::Foo.send(@method, :baz) }.should raise_error(NameError) | ||
end | ||
|
||
it "raises an ArgumentError if no arguments are given" do | ||
class SendSpecs::Foo; end | ||
lambda { SendSpecs::Foo.new.send @method }.should raise_error(ArgumentError) | ||
end | ||
|
||
it "raises an ArgumentError if called with more arguments than available parameters" do | ||
class SendSpecs::Foo | ||
def bar; end | ||
end | ||
|
||
lambda { SendSpecs::Foo.new.send(@method, :bar, :arg) }.should raise_error(ArgumentError) | ||
end | ||
|
||
it "raises an ArgumentError if called with fewer arguments than required parameters" do | ||
class SendSpecs::Foo | ||
def foo(arg); end | ||
end | ||
|
||
lambda { SendSpecs::Foo.new.send(@method, :foo) }.should raise_error(ArgumentError) | ||
end | ||
|
||
it "succeeds if passed an arbitrary number of arguments as a splat parameter" do | ||
class SendSpecs::Foo | ||
def baz(*args) args end | ||
end | ||
|
||
begin | ||
SendSpecs::Foo.new.send(@method, :baz).should == [] | ||
SendSpecs::Foo.new.send(@method, :baz, :quux).should == [:quux] | ||
SendSpecs::Foo.new.send(@method, :baz, :quux, :foo).should == [:quux, :foo] | ||
rescue | ||
fail | ||
end | ||
end | ||
|
||
it "succeeds when passing 1 or more arguments as a required and a splat parameter" do | ||
class SendSpecs::Foo | ||
def baz(first, *rest) [first, *rest] end | ||
end | ||
|
||
SendSpecs::Foo.new.send(@method, :baz, :quux).should == [:quux] | ||
SendSpecs::Foo.new.send(@method, :baz, :quux, :foo).should == [:quux, :foo] | ||
end | ||
|
||
it "succeeds when passing 0 arguments to a method with one parameter with a default" do | ||
class SendSpecs::Foo | ||
def foo(first = true) first end | ||
end | ||
|
||
begin | ||
SendSpecs::Foo.new.send(@method, :foo).should == true | ||
SendSpecs::Foo.new.send(@method, :foo, :arg).should == :arg | ||
rescue | ||
fail | ||
end | ||
end | ||
|
||
it "has a negative arity" do | ||
method(@method).arity.should < 0 | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
fails:Enumerable#each_cons raises an Argument Error if there is not a single parameter > 0 | ||
fails:Enumerable#each_cons raises an ArgumentError if there is not a single parameter > 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
fails:Enumerable#each_slice raises an Argument Error if there is not a single parameter > 0 | ||
fails:Enumerable#each_slice raises an ArgumentError if there is not a single parameter > 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fails:Enumerable#max_by when called with an argument n without a block returns an enumerator | ||
fails:Enumerable#max_by when called with an argument n when n is nil returns the maximum element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fails:Enumerable#max that is nil returns the maximum element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fails:Enumerable#min_by when called with an argument n without a block returns an enumerator | ||
fails:Enumerable#min_by when called with an argument n when n is nil returns the minimum element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fails:Enumerable#min that is nil returns the minimum element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fails:Enumerable#slice_when when given a block returns an enumerator | ||
fails:Enumerable#slice_when when given a block splits chunks between adjacent elements i and j where the block returns true | ||
fails:Enumerable#slice_when when given a block calls the block for length of the receiver enumerable minus one times | ||
fails:Enumerable#slice_when when not given a block raises an ArgumentError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fails:File.birthtime raises an NotImplementedError | ||
fails:File#birthtime raises an NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fails:File::Stat#birthtime raises an NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
fails:Kernel#eval allows a binding to be captured inside an eval | ||
fails:Kernel#eval raises a LocalJumpError if there is no lambda-style closure in the chain | ||
fails:Kernel#eval unwinds through a Proc-style closure and returns from a lambda-style closure in the closure chain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fails:Kernel.throw raises an UncaughtThrowError if there is no catch block for the symbol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fails:Method#curry with optional arity argument raises ArgumentError when the method requires less arguments than the given arity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
fails:ObjectSpace.each_object calls the block once for each living, non-immediate object in the Ruby process | ||
fails:ObjectSpace.each_object returns an enumerator if not given a block | ||
fails:ObjectSpace.each_object doesn't find an object stored in a WeakRef that should have been cleared | ||
fails:ObjectSpace.each_object finds an object stored in a global variable | ||
fails:ObjectSpace.each_object finds an object stored in a top-level constant | ||
fails:ObjectSpace.each_object finds an object stored in a second-level constant | ||
fails:ObjectSpace.each_object finds an object stored in a local variable | ||
fails:ObjectSpace.each_object finds an object stored in a local variable captured in a block explicitly | ||
fails:ObjectSpace.each_object finds an object stored in a local variable captured in a block implicitly | ||
fails:ObjectSpace.each_object finds an object stored in a local variable captured in a Proc#binding | ||
fails:ObjectSpace.each_object finds an object stored in a local variable captured in a Kernel#binding | ||
fails:ObjectSpace.each_object finds an object stored in a local variable set in a binding manually | ||
fails:ObjectSpace.each_object finds an object stored in an array | ||
fails:ObjectSpace.each_object finds an object stored in a hash key | ||
fails:ObjectSpace.each_object finds an object stored in a hash value | ||
fails:ObjectSpace.each_object finds an object stored in an instance variable | ||
fails:ObjectSpace.each_object finds an object stored in a thread local | ||
fails:ObjectSpace.each_object finds an object stored in a fiber local | ||
fails:ObjectSpace.each_object finds an object captured in an at_exit handler | ||
fails:ObjectSpace.each_object finds an object captured in finalizer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
fails:An instance method with a default argument does not call a method with the same name as the local | ||
fails:An instance method with a default argument shadows an existing method with the same name as the local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
fails:A lambda expression 'lambda { ... }' with an implicit block can be created | ||
fails:A lambda literal -> () { } assigns variables from parameters with circular optional argument reference shadows an existing local with the same name as the argument | ||
fails:A lambda literal -> () { } assigns variables from parameters with circular optional argument reference shadows an existing method with the same name as the argument |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fails:BasicObject#method_missing for a Module with #method_missing defined is called when a protected method is called | ||
fails:BasicObject#method_missing for a Module with #method_missing defined is called when a private method is called | ||
fails:BasicObject#method_missing for a Class with #method_missing defined is called when an protected method is called | ||
fails:BasicObject#method_missing for a Class with #method_missing defined is called when an private method is called | ||
fails:BasicObject#method_missing for an instance with #method_missing defined is called when an protected method is called | ||
fails:BasicObject#method_missing for an instance with #method_missing defined is called when an private method is called |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fails:Binding#local_variables includes shadowed local variables only once |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fails:Binding#receiver returns the object to which binding is bound |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fails:Enumerable#max_by when called with an argument n without a block returns an enumerator | ||
fails:Enumerable#max_by when called with an argument n with a block returns an array containing the maximum n elements based on the block's value | ||
fails:Enumerable#max_by when called with an argument n with a block on a enumerable of length x where x < n returns an array containing the maximum n elements of length n | ||
fails:Enumerable#max_by when called with an argument n when n is nil returns the maximum element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fails:Enumerable#max when called with an argument n without a block returns an array containing the maximum n elements | ||
fails:Enumerable#max when called with an argument n with a block returns an array containing the maximum n elements | ||
fails:Enumerable#max when called with an argument n on a enumerable of length x where x < n returns an array containing the maximum n elements of length x | ||
fails:Enumerable#max that is nil returns the maximum element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fails:Enumerable#min_by when called with an argument n without a block returns an enumerator | ||
fails:Enumerable#min_by when called with an argument n with a block returns an array containing the minimum n elements based on the block's value | ||
fails:Enumerable#min_by when called with an argument n with a block on a enumerable of length x where x < n returns an array containing the minimum n elements of length n | ||
fails:Enumerable#min_by when called with an argument n when n is nil returns the minimum element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fails:Enumerable#min when called with an argument n without a block returns an array containing the minimum n elements | ||
fails:Enumerable#min when called with an argument n with a block returns an array containing the minimum n elements | ||
fails:Enumerable#min when called with an argument n on a enumerable of length x where x < n returns an array containing the minimum n elements of length x | ||
fails:Enumerable#min that is nil returns the minimum element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fails:Enumerable#slice_after raises an ArgumentError when given an incorrect number of arguments | ||
fails:Enumerable#slice_after when given an argument and no block calls === on the argument to determine when to yield | ||
fails:Enumerable#slice_after when given an argument and no block doesn't yield an empty array if the filter matches the first entry or the last entry | ||
fails:Enumerable#slice_after when given an argument and no block uses standard boolean as a test | ||
fails:Enumerable#slice_after when given a block and no argument calls the block to determine when to yield | ||
fails:Enumerable#slice_after when given a block and an argument raises an ArgumentError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fails:Enumerable#slice_when when given a block returns an enumerator | ||
fails:Enumerable#slice_when when given a block splits chunks between adjacent elements i and j where the block returns true | ||
fails:Enumerable#slice_when when given a block calls the block for length of the receiver enumerable minus one times | ||
fails:Enumerable#slice_when when not given a block raises an ArgumentError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fails:File.birthtime raises an NotImplementedError | ||
fails:File#birthtime raises an NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fails:File::Stat#birthtime raises an NotImplementedError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fails:Float#next_float returns a float the smallest possible step greater than the receiver | ||
fails:Float#next_float steps directly between MAX and INFINITY | ||
fails:Float#next_float steps directly between 1.0 and 1.0 + EPSILON | ||
fails:Float#next_float steps directly between -1.0 and -1.0 + EPSILON/2 | ||
fails:Float#next_float reverses the effect of prev_float | ||
fails:Float#next_float returns negative zero when stepping upward from just below zero | ||
fails:Float#next_float returns NAN if NAN was the receiver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fails:Float#prev_float returns a float the smallest possible step smaller than the receiver | ||
fails:Float#prev_float steps directly between MAX and INFINITY | ||
fails:Float#prev_float steps directly between 1.0 and 1.0 - EPSILON/2 | ||
fails:Float#prev_float steps directly between -1.0 and -1.0 - EPSILON | ||
fails:Float#prev_float reverses the effect of next_float | ||
fails:Float#prev_float returns positive zero when stepping downward from just above zero | ||
fails:Float#prev_float returns NAN if NAN was the receiver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fails:Kernel.throw raises an UncaughtThrowError if there is no catch block for the symbol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
fails:Method#curry returns a curried proc | ||
fails:Method#curry with optional arity argument returns a curried proc when given correct arity | ||
fails:Method#curry with optional arity argument raises ArgumentError when the method requires less arguments than the given arity | ||
fails:Method#curry with optional arity argument raises ArgumentError when the method requires more arguments than the given arity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fails:Method#super_method returns the method that would be called by super in the method | ||
fails:Method#super_method returns nil when there's no super method in the parent | ||
fails:Method#super_method returns nil when the parent's method is removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fails:UnboundMethod#super_method returns the method that would be called by super in the method | ||
fails:UnboundMethod#super_method returns nil when there's no super method in the parent | ||
fails:UnboundMethod#super_method returns nil when the parent's method is removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters