From 85d1a8ba3b72c7955b2dccf2cd20dfe8899de0a1 Mon Sep 17 00:00:00 2001 From: eregon Date: Mon, 27 Aug 2018 14:49:56 +0000 Subject: [PATCH] Update to ruby/spec@a89819d git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/language/fixtures/utf16-le-bom.rb | Bin 71 -> 70 bytes spec/ruby/language/predefined/data_spec.rb | 9 ++++++++- .../predefined/fixtures/no_newline_data.rb | 3 --- 3 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 spec/ruby/language/predefined/fixtures/no_newline_data.rb diff --git a/spec/ruby/language/fixtures/utf16-le-bom.rb b/spec/ruby/language/fixtures/utf16-le-bom.rb index 935a9041faf0760feff78e1f7f00ca3f9867d891..981016ea520c6bdf33be2f660578881603ebc985 100644 GIT binary patch delta 4 LcmZ>Fo8Sfj16ToM delta 6 NcmZ>BpWw#G1po#s0dD{R diff --git a/spec/ruby/language/predefined/data_spec.rb b/spec/ruby/language/predefined/data_spec.rb index e57184ce99..6a070c5d5e 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 c6d9bc6f1f..0000000000 --- a/spec/ruby/language/predefined/fixtures/no_newline_data.rb +++ /dev/null @@ -1,3 +0,0 @@ -p DATA.pos -p DATA.read -__END__