diff options
author | Benoit Daloze <[email protected]> | 2024-02-05 16:29:57 +0100 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2024-02-05 16:29:57 +0100 |
commit | 40642cd3bc581d3bb402ea5e8e61cdfb868b4f68 (patch) | |
tree | 077cc3ac94f880ce3c8c98322331c01cb1cc9cb8 /spec/ruby/core/kernel | |
parent | abe07d4bf5f2f848b22e511a647a85c878066adb (diff) |
Update to ruby/spec@3fc4444
Diffstat (limited to 'spec/ruby/core/kernel')
-rw-r--r-- | spec/ruby/core/kernel/eval_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/ruby/core/kernel/eval_spec.rb b/spec/ruby/core/kernel/eval_spec.rb index 3dfc863368..f3b025fb7b 100644 --- a/spec/ruby/core/kernel/eval_spec.rb +++ b/spec/ruby/core/kernel/eval_spec.rb @@ -261,6 +261,19 @@ describe "Kernel#eval" do end end + it "makes flip-flop operator work correctly" do + ScratchPad.record [] + + eval "10.times { |i| ScratchPad << i if (i == 4)...(i == 4) }" + ScratchPad.recorded.should == [4, 5, 6, 7, 8, 9] + + ScratchPad.clear + end + + it "returns nil if given an empty string" do + eval("").should == nil + end + # See language/magic_comment_spec.rb for more magic comments specs describe "with a magic encoding comment" do it "uses the magic comment encoding for the encoding of literal strings" do |