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: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9a0726cf04b4
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 90d1951b5a48
Choose a head ref
  • 5 commits
  • 4 files changed
  • 1 contributor

Commits on Jun 28, 2016

  1. Copy the full SHA
    71f8600 View commit details
  2. Copy the full SHA
    204fae4 View commit details
  3. Copy the full SHA
    b529270 View commit details
  4. Copy the full SHA
    0a51083 View commit details
  5. Copy the full SHA
    90d1951 View commit details
Showing with 16 additions and 7 deletions.
  1. +1 −1 configure
  2. +8 −6 core/io.rb
  3. 0 spec/{rbx.2.2.mspec → rbx.2.3.mspec}
  4. +7 −0 spec/ruby/core/io/popen_spec.rb
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
@@ -161,7 +161,7 @@ class Configure
@vendored_libdir = File.join(root, "/vendor")

# Ruby compatibility version
@ruby_version = "2.2.2"
@ruby_version = "2.3.0"
@ruby_libversion = @ruby_version.split(/\./)[0..1].join.to_i

@build_bin = "#{@sourcedir}/build/bin"
14 changes: 8 additions & 6 deletions core/io.rb
Original file line number Diff line number Diff line change
@@ -318,10 +318,6 @@ def write(str)
else
break
end
elsif errno == Errno::EPIPE::Errno
if @descriptor == 1 || @descriptor == 2
return(buf_size)
end
end

error = true
@@ -1838,8 +1834,14 @@ def advise(advice, offset = 0, len = 0)
offset = Rubinius::Type.coerce_to offset, Integer, :to_int
len = Rubinius::Type.coerce_to len, Integer, :to_int

if FFI.call_failed?(FFI::Platform::POSIX.posix_fadvise(descriptor, offset, len, advice))
Errno.handle("posix_fadvise(2) failed")
begin
if FFI.call_failed?(FFI::Platform::POSIX.posix_fadvise(descriptor, offset, len, advice))
Errno.handle("posix_fadvise(2) failed")
end
rescue NotImplementedError
# MRI thinks platforms that don't support #advise should silently fail.
# See https://bugs.ruby-lang.org/issues/11806
nil
end

nil
File renamed without changes.
7 changes: 7 additions & 0 deletions spec/ruby/core/io/popen_spec.rb
Original file line number Diff line number Diff line change
@@ -21,6 +21,13 @@
lambda { @io.write('foo') }.should raise_error(IOError)
end

it "forces an infinitely looping subprocess to close" do
io = IO.popen "#{RUBY_EXE} -e 'r = loop{puts \"y\"; 0} rescue 1; exit r'", 'r'
io.close

$?.exitstatus.should_not == 0
end

platform_is_not :windows do
before :each do
@fname = tmp("IO_popen_spec")