mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@a89819d
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
35f2b71ce9
commit
85d1a8ba3b
3 changed files with 8 additions and 4 deletions
Binary file not shown.
|
@ -32,7 +32,14 @@ describe "The DATA constant" do
|
|||
end
|
||||
|
||||
it "is set even if there is no newline after __END__" do
|
||||
ruby_exe(fixture(__FILE__, "no_newline_data.rb")).should == "30\n\"\"\n"
|
||||
path = tmp("no_newline_data.rb")
|
||||
code = File.read(fixture(__FILE__, "empty_data.rb"))
|
||||
touch(path) { |f| f.write code.chomp }
|
||||
begin
|
||||
ruby_exe(path).should == "30\n\"\"\n"
|
||||
ensure
|
||||
rm_r path
|
||||
end
|
||||
end
|
||||
|
||||
it "rewinds to the head of the main script" do
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
p DATA.pos
|
||||
p DATA.read
|
||||
__END__
|
Loading…
Add table
Reference in a new issue