Age | Commit message (Collapse) | Author |
|
Has been deprecated since 373282f6656d3d3d989d261e7a95f8e81b5c9712.
|
|
|
|
|
|
|
|
|
|
Random generators are not Ractor-safe, so we need to prepare
per-ractor default random genearators. This patch set
`Random::DEFAULT = Randm` (not a Random instance, but the Random
class) and singleton methods like `Random.rand()` use a per-ractor
random generator.
[Feature #17322]
Notes:
Merged: https://github.com/ruby/ruby/pull/3813
|
|
Which UTF-8 char corresponds to the binary representation is
nonsense for other encodings, and just confusing.
|
|
The mapping table is generated from the ICU project:
https://github.com/unicode-org/icu/blob/master/icu4c/source/data/mappings/ibm-720_P100-1997.ucm
Fixes bug 16233 : https://bugs.ruby-lang.org/issues/16233
Notes:
Merged-By: nurse <naruse@airemix.jp>
|
|
|
|
This modifies the following String methods to return String instances
instead of subclass instances:
* String#*
* String#capitalize
* String#center
* String#chomp
* String#chop
* String#delete
* String#delete_prefix
* String#delete_suffix
* String#downcase
* String#dump
* String#each/#each_line
* String#gsub
* String#ljust
* String#lstrip
* String#partition
* String#reverse
* String#rjust
* String#rpartition
* String#rstrip
* String#scrub
* String#slice!
* String#slice/#[]
* String#split
* String#squeeze
* String#strip
* String#sub
* String#succ/#next
* String#swapcase
* String#tr
* String#tr_s
* String#upcase
This also fixes a bug in String#swapcase where it would return the
receiver instead of a copy of the receiver if the receiver was the
empty string.
Some string methods were left to return subclass instances:
* String#+@
* String#-@
Both of these methods will return the receiver (subclass instance)
in some cases, so it is best to keep the returned class consistent.
Fixes [#10845]
Notes:
Merged: https://github.com/ruby/ruby/pull/3701
|
|
Fixes [Bug #14726]
Notes:
Merged: https://github.com/ruby/ruby/pull/3330
|
|
|
|
|
|
|
|
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20201112T123004Z.fail.html.gz
```
1)
File.utime allows Time instances in the far future to set mtime and
atime (but some filesystems limit it up to 2446-05-10) FAILED
Expected [559444, 2446].include? 2038
to be truthy but was false
/home/chkbuild/chkbuild/tmp/build/20201112T123004Z/ruby/spec/ruby/core/file/utime_spec.rb:80:in
`block (4 levels) in <top (required)>'
/home/chkbuild/chkbuild/tmp/build/20201112T123004Z/ruby/spec/ruby/core/file/utime_spec.rb:3:in
`<top (required)>'
```
```
$ touch foo
$ ./miniruby -e 'time = Time.at(1<<44); File.utime(time, time, "foo")'
$ ls -l foo
-rw-r--r--. 1 mame wheel 0 Jan 19 2038 foo
```
|
|
|
|
|
|
This reverts commit ee7cc6ac35cfb056b3946b1dcd6d4d5a140ccacf.
I'm not sure I agree with the spec, but I just tweaked it.
Notes:
Merged: https://github.com/ruby/ruby/pull/3736
|
|
This changes the following methods to return Array instances instead
of subclass instances:
* Array#drop
* Array#drop_while
* Array#flatten
* Array#slice!
* Array#slice/#[]
* Array#take
* Array#take_while
* Array#uniq
* Array#*
Fixes [Bug #6087]
Notes:
Merged: https://github.com/ruby/ruby/pull/3690
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
|
|
|
|
https://github.com/ruby/ruby/runs/1337845174
|
|
|
|
[Feature #17260] One-line pattern matching using tASSOC
R-assignment is rejected instead.
Notes:
Merged-By: nobu <nobu@ruby-lang.org>
|
|
uplevel: n)
* Fixes [Bug #17259]
Notes:
Merged: https://github.com/ruby/ruby/pull/3647
|
|
defined in Ruby
Notes:
Merged: https://github.com/ruby/ruby/pull/3647
|
|
|
|
* The spec means to use an actual system library function, not a wrapper.
|
|
|
|
* cast scalar value instead of function
* use `rb_pid_t` for the portability
|
|
|
|
|
|
|
|
* numeric.c: prohibit zero step in Numeric#step
* range.c: prohibit zero step in Range#step
* Fix ruby-spec
[Feature #15573]
Notes:
Merged: https://github.com/ruby/ruby/pull/3689
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3659
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3659
|
|
on Android
|
|
Using Fiber#transfer with Fiber#resume for a same Fiber is
limited (once Fiber#transfer is called for a fiber, the fiber
can not be resumed more). This restriction was introduced to
protect the resume/yield chain, but we realized that it is too much
to protect the chain. Instead of the current restriction, we
introduce some other protections.
(1) can not transfer to the resuming fiber.
(2) can not transfer to the yielding fiber.
(3) can not resume transferred fiber.
(4) can not yield from not-resumed fiber.
[Bug #17221]
Also at the end of a transferred fiber, it had continued on root fiber.
However, if the root fiber resumed a fiber (and that fiber can resumed
another fiber), this behavior also breaks the resume/yield chain.
So at the end of a transferred fiber, switch to the edge of resume
chain from root fiber.
For example, root fiber resumed f1 and f1 resumed f2, transferred to
f3 and f3 terminated, then continue from the fiber f2 (it was continued
from root fiber without this patch).
Notes:
Merged: https://github.com/ruby/ruby/pull/3636
|
|
Attempting to create a hard link raises EACCES
|
|
As [Bug #16662] lchmod available in linux since glibc 2.31.9000, a
system call may exist or not exist depending on the version. It
is not a spec nor responsibility of Ruby.
|
|
On Android, STDERR seems to be open even its invoker closes it.
http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20201001T014315Z.fail.html.gz
```
1)
Process.spawn closes STDERR in the child if :err => :close FAILED
Expected (59840): "out\nrescued\n"
but got: "out\n"
```
|
|
Patch adapted from Pietro Monteiro [Fixes bug#8382]
Notes:
Merged: https://github.com/ruby/ruby/pull/3593
|
|
|
|
|
|
|
|
|
|
|
|
This adds the following C-API functions that can be used to emit
warnings with categories included:
```c
void rb_category_warn(const char *, const char*, ...)
void rb_category_warning(const char*, const char*, ...)
```
Internally in error.c, there is an rb_warn_category function
that will call Warning.warn with the string and the category
keyword if it doesn't have an arity of 1, and will call
Warning.warn with just the string if it has an arity of 1.
This refactors the rb_warn_deprecated{,_to_remove} functions
to use rb_warn_category.
This makes Kernel#warn accept a category keyword and pass it
to Warning.warn, so that Ruby methods can more easily emit
warnings with categories. rb_warn_category makes sure that
the passed category is a already defined category symbol
before calling Warning.warn.
The only currently defined warning category is :deprecated,
since that is what is already used. More categories can be
added in later commits.
Notes:
Merged: https://github.com/ruby/ruby/pull/3508
|
|
|