diff --git a/spec/ruby/language/fixtures/utf16-le-bom.rb b/spec/ruby/language/fixtures/utf16-le-bom.rb index 935a9041fa..981016ea52 100644 Binary files a/spec/ruby/language/fixtures/utf16-le-bom.rb and b/spec/ruby/language/fixtures/utf16-le-bom.rb differ 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__