Age | Commit message (Collapse) | Author |
|
This commit moves IO#readline to Ruby. In order to call C functions,
keyword arguments must be converted to hashes. Prior to this commit,
code like `io.readline(chomp: true)` would allocate a hash. This
commits moves the keyword "denaturing" to Ruby, allowing us to send
positional arguments to the C API and avoiding the hash allocation.
Here is an allocation benchmark for the method:
```
x = GC.stat(:total_allocated_objects)
File.open("/usr/share/dict/words") do |f|
f.readline(chomp: true) until f.eof?
end
p ALLOCATIONS: GC.stat(:total_allocated_objects) - x
```
Before this commit, the output was this:
```
$ make run
./miniruby -I./lib -I. -I.ext/common -r./arm64-darwin22-fake ./test.rb
{:ALLOCATIONS=>707939}
```
Now it is this:
```
$ make run
./miniruby -I./lib -I. -I.ext/common -r./arm64-darwin22-fake ./test.rb
{:ALLOCATIONS=>471962}
```
[Bug #19890] [ruby-core:114803]
|
|
Deprecate Kernel#open and IO support for subprocess creation and
forking. This deprecates subprocess creation and forking in
- Kernel#open
- URI.open
- IO.binread
- IO.foreach
- IO.readlines
- IO.read
- IO.write
This behavior is slated to be removed in Ruby 4.0
[Feature #19630]
Notes:
Merged: https://github.com/ruby/ruby/pull/7915
|
|
* Documentation consistency.
* Improve consistency of `pread`/`pwrite` implementation when given length.
* Remove HAVE_PREAD / HAVE_PWRITE - it is no longer optional.
Notes:
Merged-By: ioquatix <[email protected]>
|
|
This test should be fixed and fast now because the closing thread sleeps
appropriately waiting for the file descriptor to be unused.
Notes:
Merged: https://github.com/ruby/ruby/pull/7865
|
|
Fixes [Bug #19380]
Notes:
Merged: https://github.com/ruby/ruby/pull/7289
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7462
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/7462
|
|
Notes:
Merged-By: ioquatix <[email protected]>
|
|
* Windows: Fix warning about undefined if_indextoname()
* Windows: Fix UNIXSocket on MINGW and make .pair more reliable
* Windows: Use nonblock=true for read tests with scheduler
* Windows: Move socket detection from File.socket? to File.stat
Add S_IFSOCK to Windows and interpret reparse points accordingly.
Enable tests that work now.
* Windows: Use wide-char functions to UNIXSocket
This fixes behaviour with non-ASCII characters.
It also fixes deletion of temporary UNIXSocket.pair files.
* Windows: Add UNIXSocket tests for specifics of Windows impl.
* Windows: fix VC build due to missing _snwprintf
Avoid usage of _snwprintf, since it fails linking ruby.dll like so:
linking shared-library x64-vcruntime140-ruby320.dll
x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf
x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l
whereas linking miniruby.exe succeeds.
This patch uses snprintf on the UTF-8 string instead.
Also remove branch GetWindowsDirectoryW, since it doesn't work.
* Windows: Fix dangling symlink test failures
Co-authored-by: Lars Kanis <[email protected]>
Notes:
Merged-By: ioquatix <[email protected]>
|
|
Notes:
Merged-By: ioquatix <[email protected]>
|
|
Notes:
Merged-By: ioquatix <[email protected]>
|
|
Notes:
Merged-By: ioquatix <[email protected]>
|
|
Notes:
Merged-By: ioquatix <[email protected]>
|
|
Raise `ArgumentError` in `IO#sysread` on Windows when given a negative
length.
Fixes [Bug #18880]
Notes:
Merged: https://github.com/ruby/ruby/pull/6354
Merged-By: nobu <[email protected]>
|
|
Makes behavior consistent with IO.readlines.
Fixes [Bug #18767]
Notes:
Merged: https://github.com/ruby/ruby/pull/5954
|
|
|
|
nil separator means no sepator, so chomp should not remove a line
separator.
Partially Fixes [Bug #18770]
Notes:
Merged: https://github.com/ruby/ruby/pull/6164
|
|
chomp"
This reverts commit 04f86ad0b5d2fe4711ff300d855228a6aed55f33.
This is causing CI issues, reverting for now.
|
|
nil separator means no sepator, so chomp should not remove a line
separator.
Partially Fixes [Bug #18770]
Notes:
Merged: https://github.com/ruby/ruby/pull/5959
|
|
Fixes [Bug #18771]
Notes:
Merged: https://github.com/ruby/ruby/pull/5953
|
|
|
|
In `IO#readpartial` and `IO#read_nonblock`, as well as `IO#read`.
Notes:
Merged: https://github.com/ruby/ruby/pull/5323
|
|
Notes:
Merged-By: k0kubun <[email protected]>
|
|
`fcopyfile` appends `src` to `to` and then truncates `to` to it's
original size.
|
|
Remove tests that assume objects get force recycled.
Notes:
Merged: https://github.com/ruby/ruby/pull/5096
|
|
Mashalling a closed IO object raised "closed stream (IOError)" before instead of TypeError.
This changes IO#(in|ex)ternal_encoding to still return the encoding even if the underlying FD is closed.
Fixes bug #18077
Notes:
Merged: https://github.com/ruby/ruby/pull/4758
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4592
|
|
because the name "MJIT" is an internal code name, it's inconsistent with
--jit while they are related to each other, and I want to discourage future
JIT implementation-specific (e.g. MJIT-specific) APIs by this rename.
[Feature #17490]
|
|
Also document that both :deprecated and :experimental are supported
:category option values.
The locations where warnings were marked as deprecation warnings
was previously reviewed by shyouhei.
Comment a couple locations where deprecation warnings should probably
be used but are not currently used because deprecation warning
enablement has not occurred at the time they are called
(RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K).
Add assert_deprecated_warn to test assertions. Use this to simplify
some tests, and fix failing tests after marking some warnings with
deprecated category.
Notes:
Merged: https://github.com/ruby/ruby/pull/3917
|
|
* Otherwise those tests, etc cannot run on alternative Ruby implementations.
|
|
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20201203T123002Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:1830:
warning: method redefined; discarding old test_each_byte
/home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:376:
warning: previous definition of test_each_byte was here
test/unit warning: method TestIO#test_each_byte is redefined
/home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:1849:
warning: method redefined; discarding old test_each_char
/home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:1799:
warning: previous definition of test_each_char was here
test/unit warning: method TestIO#test_each_char is redefined
```
|
|
This commit deletes
{IO,ARGF,StringIO,Zib::GZipReader}#{bytes,chars,lines,codepoints}, which
have been deprecated since c47c095b9740e7c19d6fdca29ab661c1089221d4.
Note that String also has those methods. They are neither depreacted
nor deleted because they are not aliases of counterpart each_something.
|
|
test_io.rb"
* This partially reverts commit dead7478748a828c45e16134fca812bc7771344e.
* Windows will not allow a file to be unlinked if any file handles exist,
see https://github.com/ruby/ruby/pull/3597
|
|
|
|
And `-w` option turns it on.
Notes:
Merged: https://github.com/ruby/ruby/pull/3481
|
|
Start with https://github.com/ruby/ruby/commit/fa21985a7a2f8f52a8bd82bd12a724e9dca74934
to https://github.com/ruby/ruby/commit/d7492a0be885ea9f2b9f71e3e95582f9a859c439
|
|
automatically
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3460
|
|
As well as the other places using RCLASS_IV_INDEX_TBL.
`IO#reopen` seems the only case that the class of an object can be
changed.
|
|
So that `TEST_EXCLUDES` option in common.mk works.
|
|
Raise `SignalException` for SIGPIPE to abort when EPIPE occurs.
Notes:
Merged: https://github.com/ruby/ruby/pull/3013
Merged-By: nobu <[email protected]>
|
|
Previously, the external encoding was only set correctly for
File::BINARY if keyword arguments were provided. This copies
the logic for the keyword arguments case to the no keyword
arguments case. Possibly it should be refactored into a
separate function.
Fixes [Bug #16737]
Notes:
Merged: https://github.com/ruby/ruby/pull/2985
|
|
This reverts commit 0bfee2397ba59112902d2b49f08461db3a637b46.
|
|
https://gist.github.com/ko1/a71f7cbcfbd61ba004bffdfedab9f5f2#file-brlog-trunk-random0-20200302-020213-L2127
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2920
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2920
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2794
|
|
warnings
|