Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c78aa1ec15a1
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f4e638a919b8
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 27, 2016

  1. Copy the full SHA
    eb438f7 View commit details
  2. Copy the full SHA
    5ab1dae View commit details
  3. Copy the full SHA
    f4e638a View commit details
Showing with 14 additions and 5 deletions.
  1. +11 −3 spec/ruby/shared/process/spawn.rb
  2. +1 −0 spec/truffle/tags/command_line/frozen_strings_tags.txt
  3. +2 −2 spec/truffle/tags/core/file/flock_tags.txt
14 changes: 11 additions & 3 deletions spec/ruby/shared/process/spawn.rb
Original file line number Diff line number Diff line change
@@ -250,19 +250,26 @@

# :unsetenv_others

before :each do
@minimal_env = {
"PATH" => ENV["PATH"],
"HOME" => ENV["HOME"]
}
end

platform_is_not :windows do
it "unsets other environment variables when given a true :unsetenv_others option" do
ENV["FOO"] = "BAR"
lambda do
Process.wait @object.spawn({"PATH" => ENV["PATH"]}, ruby_cmd(fixture(__FILE__, "env.rb"), options: "--disable-gems"), unsetenv_others: true)
Process.wait @object.spawn(@minimal_env, ruby_cmd(fixture(__FILE__, "env.rb"), options: "--disable-gems"), unsetenv_others: true)
$?.success?.should be_true
end.should output_to_fd("")
end

it "unsets other environment variables when given a non-false :unsetenv_others option" do
ENV["FOO"] = "BAR"
lambda do
Process.wait @object.spawn({"PATH" => ENV["PATH"]}, ruby_cmd(fixture(__FILE__, "env.rb"), options: "--disable-gems"), unsetenv_others: :true)
Process.wait @object.spawn(@minimal_env, ruby_cmd(fixture(__FILE__, "env.rb"), options: "--disable-gems"), unsetenv_others: :true)
$?.success?.should be_true
end.should output_to_fd("")
end
@@ -287,7 +294,8 @@
platform_is_not :windows do
it "does not unset environment variables included in the environment hash" do
lambda do
Process.wait @object.spawn({"FOO" => "BAR"}, ruby_cmd(fixture(__FILE__, "env.rb"), options: "--disable-gems"), unsetenv_others: true)
env = @minimal_env.merge({"FOO" => "BAR"})
Process.wait @object.spawn(env, ruby_cmd(fixture(__FILE__, "env.rb"), options: "--disable-gems"), unsetenv_others: true)
$?.success?.should be_true
end.should output_to_fd("BAR")
end
1 change: 1 addition & 0 deletions spec/truffle/tags/command_line/frozen_strings_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:The --debug flag produces debugging info on attempted frozen string modification
4 changes: 2 additions & 2 deletions spec/truffle/tags/core/file/flock_tags.txt
Original file line number Diff line number Diff line change
@@ -7,5 +7,5 @@ solaris:File#flock exclusively locks a file
solaris:File#flock non-exclusively locks a file
solaris:File#flock blocks if trying to lock an exclusively locked file
solaris:File#flock returns 0 if trying to lock a non-exclusively locked file
solaris:File#flock on Solaris or Java fails with EBADF acquiring exclusive lock on read-only File
solaris:File#flock on Solaris or Java fails with EBADF acquiring shared lock on read-only File
solaris:File#flock on Solaris fails with EBADF acquiring exclusive lock on read-only File
solaris:File#flock on Solaris fails with EBADF acquiring shared lock on read-only File