Skip to content

Commit

Permalink
Suppress warning about setting $/ and $\ in -l specs
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Feb 28, 2020
1 parent 03e845b commit 41bf282
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions command_line/dash_l_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@

ruby_version_is "2.5" do
it "chomps last line based on $/" do
ruby_exe('BEGIN { $/ = "ones\n" }; puts $_', options: "-n -l", escape: true,
ruby_exe('BEGIN { $/ = "ones\n" }; puts $_', options: "-W0 -n -l", escape: true,
args: " < #{@names}").should ==
"alice j\nbob field\njames grey\n"
end
end

it "sets $\\ to the value of $/" do
ruby_exe("puts $\\ == $/", options: "-n -l", escape: true,
ruby_exe("puts $\\ == $/", options: "-W0 -n -l", escape: true,
args: " < #{@names}").should ==
"true\ntrue\ntrue\n"
end
Expand Down

0 comments on commit 41bf282

Please sign in to comment.