Skip to content

Commit e78023f

Browse files
eregonandrykonchin
authored andcommitted
Add spec for eval("")
1 parent f151b1f commit e78023f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/ruby/core/kernel/eval_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ class EvalSpecs
270270
ScratchPad.clear
271271
end
272272

273+
it "returns nil if given an empty string" do
274+
eval("").should == nil
275+
end
276+
273277
# See language/magic_comment_spec.rb for more magic comments specs
274278
describe "with a magic encoding comment" do
275279
it "uses the magic comment encoding for the encoding of literal strings" do

0 commit comments

Comments
 (0)