summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 14:49:56 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-27 14:49:56 +0000
commit85d1a8ba3b72c7955b2dccf2cd20dfe8899de0a1 (patch)
treea0371e12ddcdb86b48ca964774b715b6e8feb569
parent35f2b71ce979e6d65f5c96d8598cb493632604b9 (diff)
Update to ruby/spec@a89819d
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--spec/ruby/language/fixtures/utf16-le-bom.rbbin71 -> 70 bytes
-rw-r--r--spec/ruby/language/predefined/data_spec.rb9
-rw-r--r--spec/ruby/language/predefined/fixtures/no_newline_data.rb3
3 files changed, 8 insertions, 4 deletions
diff --git a/spec/ruby/language/fixtures/utf16-le-bom.rb b/spec/ruby/language/fixtures/utf16-le-bom.rb
index 935a904..981016e 100644
--- a/spec/ruby/language/fixtures/utf16-le-bom.rb
+++ b/spec/ruby/language/fixtures/utf16-le-bom.rb
Binary files differ
diff --git a/spec/ruby/language/predefined/data_spec.rb b/spec/ruby/language/predefined/data_spec.rb
index e57184c..6a070c5 100644
--- a/spec/ruby/language/predefined/data_spec.rb
+++ b/spec/ruby/language/predefined/data_spec.rb
@@ -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
diff --git a/spec/ruby/language/predefined/fixtures/no_newline_data.rb b/spec/ruby/language/predefined/fixtures/no_newline_data.rb
deleted file mode 100644
index c6d9bc6..0000000
--- a/spec/ruby/language/predefined/fixtures/no_newline_data.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-p DATA.pos
-p DATA.read
-__END__