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

Decide lambdaness of (f << g) using g (#2729)

* Deciding lambdaness of (f << g) using g

* Use version guards for spec changes
This commit is contained in:
Alan Wu 2019-12-30 17:47:58 -05:00 committed by GitHub
parent 3e2418e2a6
commit 99c7b0b7ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2019-12-31 07:48:31 +09:00
Merged-By: XrXr
3 changed files with 16 additions and 3 deletions

View file

@ -39,7 +39,8 @@ ruby_version_is "2.6" do
double = proc { |x| x + x }
(pow_2 << double).is_a?(Proc).should == true
(pow_2 << double).lambda?.should == true
ruby_version_is(''...'2.8') { (pow_2 << double).lambda?.should == true }
ruby_version_is('2.8') { (pow_2 << double).lambda?.should == false }
end
it "may accept multiple arguments" do