Age | Commit message (Collapse) | Author |
|
|
|
Notes:
Merged-By: ioquatix <[email protected]>
|
|
* s/Innteger/Integer/
* s/diretory/directory/
* s/Bufer/Buffer/
* s/defalt/default/
* s/covearge/coverage/
Notes:
Merged-By: k0kubun <[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]>
|
|
* Windows: Use readlink emulation for File.readlink
This fixes readlink emulation for the ERROR_MORE_DATA case and general error reporting.
It now releases GVL while readlink IO operation.
The dedicated rb_readlink was introduced in commit 2ffb87995a33cdc7ba609a4b867f03f18da0c3b3
in order to improve encoding and buffer allocation.
However the encoding issues are solved since ruby-3.0 switched to UTF-8
and the buffer allocation will be improved in a later commit.
* Windows: Increase the default buffer size for reparse point info
So far nearly all queries of reparse points needed two attempts to get enough buffer.
* Windows: Remove declaration of rb_w32_wreadlink
It was removed in commit 2f6fdd3aebdee2ce04d003b206f6da78120e8235
Notes:
Merged-By: ioquatix <[email protected]>
|
|
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Also remove the ancient word "Windows NT".
|
|
|
|
|
|
Moves Expect library doc into io.c.
Changes certain links to local sections, now pointing to sections in doc/io_streams.rdoc.
Removes local sections now superseded by sections in doc/io_streams.rdoc.
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Since macOS 13, CFString family API used in
`rb_str_append_normalized_ospath` may internally use Objective-C classes
(`NSTaggedPointerString` and `NSPlaceholderMutableString`) for small strings.
On the other hand, Objective-C classes should not be used for the first
time in a `fork()`'ed but not `exec()`'ed process. Violations for this rule
can result deadlock during class initialization, so Objective-C runtime
conservatively crashes on such cases by default.
Therefore, we need to use CFString API to initialize Objective-C classes
used internally *before* `fork()`.
For more details, see https://bugs.ruby-lang.org/issues/18912
Notes:
Merged: https://github.com/ruby/ruby/pull/6426
|
|
This page provides an overview of IO streams. It's meant to be linked to from many other doc spots. In particular it will be linked to from many places in ARGF, File, IO, and StringIO.
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Use macro instead of a static functon. This isn't very amusing but
doing this wihtout a macro (is possibe but) seems just too much.
Notes:
Merged: https://github.com/ruby/ruby/pull/6358
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6346
|
|
Get rid of the conflict with system-provided small `off_t`.
Notes:
Merged: https://github.com/ruby/ruby/pull/6329
|
|
Already using `rb_w32_truncate` and `rb_w32_ftruncate`, and
`HAVE_FTRUNCATE` has been added 14 years ago.
Notes:
Merged: https://github.com/ruby/ruby/pull/6329
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6253
|
|
If we are expanding the string or only stripping extra capacity
then coderange won't change, so clearing it is wasteful.
Notes:
Merged: https://github.com/ruby/ruby/pull/6178
|
|
[Misc #18891]
Notes:
Merged: https://github.com/ruby/ruby/pull/6094
|
|
Otherwise it's way too easy to confuse it with US_ASCII.
Notes:
Merged: https://github.com/ruby/ruby/pull/6127
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5867
|
|
|
|
Treats:
::pipe?
::symlink?
::socket?
::blockdev?
::chardev?
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Treats:
#path
::stat
::lstat
#lstat
::directory?
Also adds section "Example Files" that explains assumptions about example files. I'm using t.txt already, and I'm pretty sure I'll need t.dat (binary data). I don't know whether I'll need t.rus (Russian text).
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5804
|
|
Allocating a string of length MAXPATHLEN and then shrinking the string
is inefficient when the resulting path is short. Preallocating a large
string is also a problem for Variable Width Allocation since we can't
easily downsize the capacity.
I ran the following benchmark:
```ruby
Benchmark.ips do |x|
{
"empty" => "",
"short" => "a/" * 10,
"medium" => "a/" * 100,
"long" => "a/" * 500
}.each do |name, path|
x.report(name) do |times|
i = 0
while i < times
File.expand_path(path)
i += 1
end
end
end
end
```
On this commit:
```
empty 97.486k (± 0.7%) i/s - 492.915k in 5.056507s
short 96.026k (± 2.4%) i/s - 486.489k in 5.068966s
medium 86.304k (± 1.3%) i/s - 435.336k in 5.045112s
long 59.395k (± 1.7%) i/s - 302.175k in 5.089026s
```
On master:
```
empty 94.138k (± 1.4%) i/s - 472.158k in 5.016590s
short 92.043k (± 1.4%) i/s - 468.180k in 5.087496s
medium 84.910k (± 2.3%) i/s - 425.750k in 5.017007s
long 61.503k (± 2.7%) i/s - 309.723k in 5.039429s
```
Notes:
Merged: https://github.com/ruby/ruby/pull/5789
|
|
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5530
|
|
I used this regex:
(?<=\[)#(?:class|module)-([A-Za-z]+)-label-([A-Za-z0-9\-\+]+)
And performed a global find & replace for this:
rdoc-ref:$1@$2
Notes:
Merged: https://github.com/ruby/ruby/pull/5530
|
|
I used this regex:
([A-Za-z]+)\.html#(?:class|module)-[A-Za-z]+-label-([A-Za-z0-9\-\+]+)
And performed a global find & replace for this:
rdoc-ref:$1@$2
Notes:
Merged: https://github.com/ruby/ruby/pull/5530
|
|
Fixes some typos and dead links.
Notes:
Merged: https://github.com/ruby/ruby/pull/5530
|
|
Treats:
File introduction
File.open
File.new
Notes:
Merged-By: BurdetteLamar <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5352
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5303
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4621
|
|
|
|
- this change get rid of a warning of mswin build.
see include/ruby/internal/encoding/encoding.h(116)
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4963
|
|
After the change to use realpath on loaded features, Solaris CI
started failing in test_no_curdir (which tests behavior for running
ruby without a working directory).
I was able to trace the problem to the following call chain:
rb_call_inits->Init_Thread->Init_thread_sync->rb_provide->
get_loaded_features_index->rb_check_realpath->rb_dir_getwd_ospath->
ruby_getcwd
This will throw an exception, but because Ruby hasn't been fully
initialized at the point the exception is thrown, it just exits
with a status of 1.
The bug here is that rb_check_realpath should not raise an
exception, it should return nil. This bug is hit on Solaris
because Solaris uses the realpath emulation instead of native
realpath, and the realpath emualation raised instead of
returning nil if the mode was RB_REALPATH_CHECK. Use rb_rescue
in the realpath emulation if the mode is RB_REALPATH_CHECK, and
swallow any exceptions raised and return nil.
Notes:
Merged: https://github.com/ruby/ruby/pull/4935
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4482
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4915
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4837
Merged-By: nobu <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4791
|