Activity
From 09/06/2019 to 09/12/2019
09/12/2019
-
07:57 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- Ok, I misunderstood what `pass_keywords` was doing; I thought it would only apply to `baz(*args)` in this case.
-
03:40 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- Dan0042 (Daniel DeLorme) wrote:
> After some more thinking I believe the `pass_keywords` behavior would be appropriate for 100% of methods with an argument splat but no keywords.
We do not want this as the default behavior. Consider... -
12:53 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- After some more thinking I believe the `pass_keywords` behavior would be appropriate for 100% of methods with an argument splat but no keywords.
* If forwarding to a method with no keyword arguments
* The kwarg will be converted t... -
02:05 AM Misc #16157: What is the correct and *portable* way to do generic delegation?
- > Then if you call `foo` with keywords, keywords will be passed to `bar`. This should allow for more backwards compatible behavior with older versions of Ruby.
Ah, great! So we no longer need the RUBY_VERSION check!
I have a feeli... - 03:35 PM Revision 69acf40b (git): * 2019-09-13 [ci skip]
-
03:34 PM Revision bcd49a46 (git): Upgrade benchmark_driver to v0.15.5
- Fixed new Struct-related keyword argument warnings
-
11:19 AM Feature #14781 (Closed): Enumerator.generate - Applied in changeset commit:git|775037613bffe6f90e7af510b7f46a2ac10610be.
----------
Implement Enumerator.produce [Feature #14781] - 11:18 AM Revision ac3e8834 (git): Document and test Enumerator.produce
- Co-authored-by: Victor Shepelev <zverok.offline@gmail.com>
- 11:18 AM Revision 77503761 (git): Implement Enumerator.produce [Feature #14781]
-
09:43 AM Bug #16161: tailcall_optimization may be disabled after r67315
- How about adding `vm_call_iseq_setup_tailcall_opt_start` as same as `vm_call_iseq_setup_normal_opt_start`?
(Copy-and-paste code, sorry!)
```patch
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index a83e3a952a..4abee2fadd 100644
-... -
09:28 AM Revision 9f86e5ec (git): Moved coverage.yml to https://github.com/ruby/actions [ci skip]
-
09:25 AM Feature #16102: `Symbol#call`
- I propose this general solution.
diff --git a/array.c b/array.c
index 3717c3ff34..3809af01cf 100644
--- a/array.c
+++ b/array.c
@@ -6988,6 +6988,7 @@ Init_Array(void)
rb_define_method(rb_cArray, "dig"... -
06:47 AM Bug #16164: ENV.each with block returns ENV object itself, not Hash
- I remember the old pickaxe having mentioned ENV as a hash-like
object. I guess the documentation could be updated to include
e. g. specifically a .is_a? Hash check too, and explain that
ENV is not completely a "full" Hash. -
03:26 AM Bug #16164: ENV.each with block returns ENV object itself, not Hash
- That is a documentation bug.
-
01:04 AM Bug #16165: Endless ranges have inconsistency between #cover? and #include?
- For the sake of archives & potential future search engine hits - this got fixed a few days ago and will be in whatever public release of Rails comes after 6.0.0.
https://github.com/rails/rails/pull/36460
09/11/2019
-
11:41 PM Bug #16165 (Closed): Endless ranges have inconsistency between #cover? and #include?
- Closing as per your request. Thank you for your investigation anyway.
-
11:31 PM Bug #16165: Endless ranges have inconsistency between #cover? and #include?
- Doh, this needs closing; my apologies. I had not realised that I was testing in an execution environment that had pulled in ActiveSupport from Rails 6. This seems to break `#include?` in an endless Range. When I'm careful to use "vanilla...
-
09:59 PM Bug #16165 (Closed): Endless ranges have inconsistency between #cover? and #include?
- In an endless Range, I'd expect to be able to use `#include?` just as I do with a Range that has an end value. It would amount to just a check on whether the argument was greater than or equal to the start value of that Range (and likewi...
-
11:20 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- Dan0042 (Daniel DeLorme) wrote:
> Of course this is all *extremely* unconventional usage and doesn't really deserve a fix. But I thought it was weird/interesting.
Very interesting actually. However, while you think this method is wr... -
09:25 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- After discussion with some other committers, I have an alternative approach in https://github.com/ruby/ruby/pull/2449. This allows you to do the following:
```ruby
class Foo
def foo(*args, &block)
bar(*args, &block)
end
... -
03:36 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- > Prior to the keyword argument separation branch merge, it was not even possible for a C method to tell if it was called with keywords or called with a positional hash.
That's the same situation as ruby methods used to be in. So *th... -
09:58 PM Revision 515b1989 (git): Make NODE_ARYPTN layout consistent between Ripper and AST
- We are seeing SEGVs in CI:
http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sky1/2253563
This is happening because Ripper constructs AST nodes differently than
parse.y normally does. Specifically in this case Ripper is assigning 3
`VA... -
09:30 PM Bug #16154: lib/delegate.rb issues keyword argument warnings
- I added an alternative approach for handling delegate keyword warnings in https://github.com/ruby/ruby/pull/2449. This approach also uses a VM frame flag and a Module method (`Module#pass_keywords`), and allows for passing keywords thro...
-
09:24 PM Bug #16164 (Closed): ENV.each with block returns ENV object itself, not Hash
- My code:
x = ENV.each { |name, value| }
puts "Return value class: #{x.class}"
puts "Return value is a Hash? #{x.kind_of?(Hash)}"
puts "Return value is actually ENV itself? #{x.object_id == ENV.object_id}"
Its output:
Return ... -
09:23 PM Revision 21994b7f (git): Avoid rehashing keys in transform_values
- Previously, calling transform_values would call rb_hash_aset for each
key, needing to rehash it and look up its location.
Instead, we can use rb_hash_stlike_foreach_with_replace to replace the
values as we iterate without rehashing the ... -
06:57 PM Revision 14e37310 (git): Make sure WB executes after object is reachable
- 06:21 PM Revision 1febb6f4 (git): * 2019-09-12 [ci skip]
-
06:20 PM Revision ed96c9f2 (git): Emit missing keyword argument separation warnings for define_method
- Previously, the warning functions skipped warning in these cases.
This removes the skipping, and uses a less descriptive warning
instead.
This affected both last argument to keyword warnings and keyword
split warnings. -
05:35 PM Bug #16159: rubyspec about time fails in Asia/Kuala_Lumpur timezone
- Also, I ran it multiple times between 11pm - 1.30am
-
05:07 PM Bug #16159: rubyspec about time fails in Asia/Kuala_Lumpur timezone
- GMT+8
```
$ date +%z
+0800
``` -
03:59 PM Bug #16158: "st" Character Sequence In Regex Look-Behind Causes Illegal Pattern Error When Combined With POSIX Bracket Expressions And Case Insensitivity Flag
- Thank you both.
I can confirm the encoding being a factor. It's an issue even if it is not the default.
```
2.5.6 :013 > str = "(?<!a st)\\p{Space}".force_encoding("ISO-8859-5")
=> "(?<!a st)\\p{Space}"
2.5.6 :014 > Regexp.ne... -
01:28 PM Bug #16158 (Open): "st" Character Sequence In Regex Look-Behind Causes Illegal Pattern Error When Combined With POSIX Bracket Expressions And Case Insensitivity Flag
- This appears to be an issue if the default encoding is UTF-8:
```
$ ruby -ve 'pat = /(?<!a st)\p{Space}/i'
ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-openbsd]
$ LC_CTYPE=en_US.UTF-8 ruby -ve 'pat = /(?<!a st)\p{Space}/i' ... -
01:09 PM Bug #16158: "st" Character Sequence In Regex Look-Behind Causes Illegal Pattern Error When Combined With POSIX Bracket Expressions And Case Insensitivity Flag
- I can reproduce the bug in all versions of ruby.
```
$ 2.5 ruby -ve 'pat = /(?<!a st)\p{Space}/i'
ruby 2.5.6p167 (2019-05-30 revision 67709) [x86_64-linux]
-e:1: invalid pattern in look-behind: /(?<!a st)\p{Space}/i
$ 2.6 ruby -... -
03:03 PM Misc #16152: DevelopersMeeting20190919Japan
- - [Feature #16131] Remove $SAFE, taint and trust
- What do you think about the proposed schedule?
- I am asking because this might inform the fix for [Bug #16151]
- [Feature #16123] Allow calling a private method with `self.`
... -
02:48 PM Feature #14737: Split default gems into separate directory structure
- I opened PR [1] implementing this.
[1]: https://github.com/rubygems/rubygems/pull/2909 -
02:39 PM Revision fba5bbc6 (git): Moved doxygen.yml to https://github.com/ruby/actions [ci skip]
-
02:10 PM Feature #16146: Array .difference allow custom comparison
- What you're asking for is a O(n²) operation. I'm not sure it's a good idea to make that so easy and transparent as a core method.
This is quite easy to code and makes the (inefficiency of) two loops more apparent:
```ruby
all.reject... -
12:36 PM Revision fc3bfd52 (git): Fixed the function signature to rb_rescue2
-
09:03 AM Feature #16163 (Closed): Reduce the output of `RubyVM::InstructionSequence#to_binary`
- ## Abstract
The output of `RubyVM::InstructionSequence#to_binary` is extremely large.
We have reduced the output of `#to_binary` by more than 70%.
The execution speed of `RubyVM::InstructionSequence.load_from_binary` is about 7% s... -
07:27 AM Revision 343b0a28 (git): Made a short-circuit expression w/o result into an `if`-statement
-
07:01 AM Revision 655c65d6 (git): &$$->nd_lit is uninitialized at this point
- See also https://travis-ci.org/ruby/ruby/jobs/583031687#L1874
-
06:25 AM Feature #10238: todo: remove dependency on malloc_usable_size
- Bump. I would like to revisit this. Do we need this many call to malloc_usable_size()?
-
12:35 AM Revision 489676bd (git): Add `--no-progress` to `aws s3` [ci skip]
- https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html
> --no-progress (boolean) File transfer progress is not displayed. This flag is only applied when the quiet and only-show-errors flags are not provided. -
12:03 AM Bug #9242: Rdoc detection of aliases
- This is still an issue in the master branch. I've added a pull request for rdoc that will treat `rb_define_method` to the same C function as an alias (similar to `rb_define_alias`): https://github.com/ruby/rdoc/pull/742
09/10/2019
-
09:00 PM Revision 91ee9584 (git): Macros can't be expressions, so make a function
- Macros can't be expressions, that is a GNU extension (I didn't know
that). This commit converts the macro to a function so that everything
will compile correctly on non-GNU compatible compilers. -
08:09 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- Dan0042 (Daniel DeLorme) wrote:
> > The only time you really need the `RUBY_VERSION` check is for complete argument delegation to arbitrary methods with arbitrary arguments.
> ...
Let's say the target method is `foo(*args, **kw)`, and ... -
07:14 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- > Note that the `RUBY_VERSION` check is only needed in a subset of the cases. In cases where the target method does not accept keyword arguments, no changes are needed
Yes, I know, that's exactly what I was saying.
But my point wa... -
04:37 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- Note that the `RUBY_VERSION` check is only needed in a subset of the cases. In cases where the target method does not accept keyword arguments, no changes are needed (no need to introduce keyword arguments at all). In cases where the l...
-
02:41 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- Hmm, ok, that's what I was afraid of. I mean, it's not exactly a pretty solution. And it's not limited to method_missing; any method that accepts `*args` and forwards it to another method may have to be changed. Even if it doesn't have t...
-
07:42 PM Revision 13951023 (git): WB needs to be executed after object is reachable
-
07:06 PM Feature #16150: Add a way to request a frozen string from to_s
- @eregon, for context Matz recently refused a very similar change https://bugs.ruby-lang.org/issues/15836
-
08:12 AM Feature #16150: Add a way to request a frozen string from to_s
- I tried running ActiveSupport tests from Rails master on Ruby 2.6.2 + my PR, and found that one change is needed:
```
Error:
ConfigurableActiveSupport#test_configuration_accessors_are_not_available_on_instance:
FrozenError: can't m... -
07:25 AM Feature #16150: Add a way to request a frozen string from to_s
- Dan0042 (Daniel DeLorme) wrote:
> But I can't agree to a backward-incompatible change without a proper deprecation period.
> ...
I'm unsure if such troubles are necessary, because the practical incompatibility might be extremely low, s... -
05:48 PM Feature #16144 (Closed): Honor Logger#level overrides in Logger#add
-
05:42 PM Feature #16144: Honor Logger#level overrides in Logger#add
- My GitHub PR was merged, so I think this can be closed.
- 05:45 PM Revision 721cab47 (git): * 2019-09-11 [ci skip]
-
05:44 PM Revision 414a80d2 (git): `NODE_MATCH` needs to be marked / allocated from marking bucket
- Fixes a test in RubySpec
-
05:34 PM Bug #16154: lib/delegate.rb issues keyword argument warnings
- As some background for the dev meeting, I tried a couple of different approaches before this that didn't work.
One approach was to flag methods and have all positional hashes be treated as positional hashes (Ruby 3 behavior). That di... -
04:40 PM Bug #16162 (Feedback): Resque::DirtyExit - Child process received unhandled signal (You may have encountered a bug in the Ruby interpreter or extension libraries)
- Ruby 2.3.8 is no longer supported, can you please try with Ruby 2.5.6, 2.6.4, or the master branch?
-
12:33 PM Bug #16162 (Closed): Resque::DirtyExit - Child process received unhandled signal (You may have encountered a bug in the Ruby interpreter or extension libraries)
- My background jobs are all failing with the following error Resque::DirtyExit Child process received unhandled signal. After I restart the server they work for some minutes and then start failing. If I run the single jobs from Resque-sch...
-
09:57 AM Bug #16159: rubyspec about time fails in Asia/Kuala_Lumpur timezone
- What timezone are you using?
-
08:29 AM Revision 83ef58f2 (git): [ruby/io-console] Suppress yet another warning on Windows
- https://github.com/ruby/io-console/commit/4e17c90788
-
08:29 AM Revision b5ab918d (git): [ruby/io-console] Suppress warnings on Windows
- About unused variables and a function.
https://github.com/ruby/io-console/commit/32baf54e7a -
08:20 AM Revision ad6cbc1d (git): Unused LONG_MAX_as_double
- LONG_MAX_as_double is not needed when long is small enough to be
exactly representable as a double, e.g., IL32LLP64 platforms. -
07:04 AM Revision 487d2900 (git): oops
- Silly typo.
-
05:37 AM Revision df1721c6 (git): Fixed GCC version for diagnostic-pragmas
- "GCC diagnostic push/pop" seems appeared at gcc 4.6.
-
05:04 AM Bug #9603 (Rejected): unusual reference class-variable with cloned class.
- While not intuitive, I think this behavior is expected and not a bug. It is not relating to class cloning, it is due to class variable lookup. Normal class variable lookup (e.g. not using `Module#class_variable_{g,s}et`), uses crefs, m...
-
03:39 AM Revision f5024de0 (git): Remove check of ai.protocol
- Solaris 10 returns addrinfo.ai_protocol as 0, not 6.
-
03:25 AM Revision 20e428ec (git): fix CentOS 6 compile error
- See also https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-master/log/20190910T003005Z.fail.html.gz
-
03:21 AM Bug #9589 (Closed): Stack level too deep during eval causes segmentation fault
- From my testing with `class Object; define_method(:bar) {send(:bar)}; bar end`:
1.9-2.1: SystemStackError
2.2-2.4: segfault
2.5-master: SystemStackError
As this issue appears to have been fixed, closing. If you can reproduce wit... -
01:11 AM Revision 8d3db4f2 (git): Default to cc/c++ instead of gcc/g++ on OpenBSD
-
01:10 AM Revision 0e9d56f5 (git): Support timeout for Addrinfo
- Addrinfo.getaddrinfo and .foreach now accepts :timeout in seconds as
a keyword argument. If getaddrinfo_a(3) is available, the timeout will be
applied for name resolution. Otherwise, it will be ignored.
Socket.tcp accepts :resolv_timeou... -
12:28 AM Bug #16161 (Closed): tailcall_optimization may be disabled after r67315
- Before r67315:
```
$ ./miniruby -v -e 'iseq = RubyVM::InstructionSequence.compile("def foo(n, s = 0);return s if n < 1;foo(n - 1, n + s); end", tailcall_optimization: true); iseq.eval; p foo(900_000)'
ruby 2.7.0dev (2019-03-20 trunk...
09/09/2019
-
11:55 PM Bug #16106 (Closed): UnboundMethod owner points to base class
- The documentation for `owner` states: `Returns the class or module that defines the method.`. The example given in the documentation shows `method` being called on a Range instance, but having an owner of Enumerable. So I don't think d...
-
11:49 PM Bug #16158 (Feedback): "st" Character Sequence In Regex Look-Behind Causes Illegal Pattern Error When Combined With POSIX Bracket Expressions And Case Insensitivity Flag
- I tried on Ruby 2.5.6 and was not able to reproduce:
```
$ irb25
irb(main):001:0> pat = /(?<!a st)\p{Space}/i
=> /(?<!a st)\p{Space}/i
irb(main):002:0> pat = /(?i)(?<!a st)\p{Space}/
=> /(?i)(?<!a st)\p{Space}/
irb(main):003:0> ... -
03:19 PM Bug #16158: "st" Character Sequence In Regex Look-Behind Causes Illegal Pattern Error When Combined With POSIX Bracket Expressions And Case Insensitivity Flag
- Sorry, bad paste on the OP with the success examples.
```
2.5.0 :007 > pat = /((?<!Costa)Mesa|Arlington(?=(\p{Space}|\p{Punct})+(AZ|Arizona)))/
=> /((?<!Costa)Mesa|Arlington(?=(\p{Space}|\p{Punct})+(AZ|Arizona)))/
2.5.0 :008 > p... -
03:14 PM Bug #16158 (Open): "st" Character Sequence In Regex Look-Behind Causes Illegal Pattern Error When Combined With POSIX Bracket Expressions And Case Insensitivity Flag
- *This is my first Ruby bug submission. Please let me know if there is anything else that I can provide that would be helpful. Thanks for your time!*
I've tried just about as many combinations as I can think of and I have been able to ... -
11:18 PM Revision 3678c371 (git): [ruby/io-console] Added IO#check_winsize_changed on Windows
- https://github.com/ruby/io-console/commit/ee648fa8bb
-
11:18 PM Revision 74790e2d (git): [ruby/io-console] Added scroll methods
- https://github.com/ruby/io-console/commit/83e70de8ab
-
11:18 PM Revision c1412bd6 (git): [ruby/io-console] Added line/screen erase methods
- https://github.com/ruby/io-console/commit/e6344108a1
-
11:18 PM Revision 9844a349 (git): [ruby/io-console] Added IO#goto_column
- https://github.com/ruby/io-console/commit/143a9d5764
-
11:18 PM Revision e8be056a (git): [ruby/io-console] Added relative cursor move methods
- https://github.com/ruby/io-console/commit/21d340e4a2
-
11:18 PM Revision 3d9c7c28 (git): [ruby/io-console] Added IO#goto and IO#cursor= for VT
- https://github.com/ruby/io-console/commit/7f2b1b473d
-
11:18 PM Revision 53ed4fb3 (git): [ruby/io-console] Added IO#cursor for VT
- https://github.com/ruby/io-console/commit/41a6a6cace
-
11:18 PM Revision 803dc9e1 (git): [ruby/io-console] Added console_vt_response
- A function to query console info.
https://github.com/ruby/io-console/commit/db75a07fa3 -
11:18 PM Revision f4aa06c0 (git): [ruby/io-console] Drop fat gem support
- https://github.com/ruby/io-console/commit/972ceb081d
-
10:30 PM Misc #16156 (Closed): Enhancements to doc for class Exception
- Applied in changeset commit:git|00744a03d576f308d7fa586c2d04b5c1cb8fe3f4.
----------
Update documentation for Exception [ci skip]
Mostly from burdettelamar@yahoo.com (Burdette Lamar).
Implements [Misc #16156] -
10:20 PM Misc #16156: Enhancements to doc for class Exception
- Thanks, I'll merge this shortly with some minor changes.
-
02:05 PM Misc #16156 (Closed): Enhancements to doc for class Exception
- Enhancements (in my view) to doc for class Exception.
The git diff for error.c is attached.
Affects doc only for class Exception, not its methods or subclasses.
Mostly:
- Adds headers.
- Forms some text into bullet lists.
-
10:23 PM Revision 00744a03 (git): Update documentation for Exception [ci skip]
- Mostly from burdettelamar@yahoo.com (Burdette Lamar).
Implements [Misc #16156] -
09:40 PM Misc #16152: DevelopersMeeting20190919Japan
- * [Misc #16160] Lazy init thread local storage (methodmissing)
* Storage for Fiber local storage of execution context for `Thread#[]` and `Thread#[]=` APIs are lazy initialized.
* I think the same pattern should be applied to real ... -
09:18 PM Misc #16152: DevelopersMeeting20190919Japan
- * [Misc #16124] Let the transient heap belong to objspace (methodmissing)
* As per PR and outline of pros and cons in the issue, I think it's stable and performance enough to be coupled a little tighter to objspace instead of just bei... -
04:13 AM Misc #16152: DevelopersMeeting20190919Japan
- * [Bug #16154] lib/delegate.rb issues keyword argument warnings
* `Module#pass_positional_hash` for disabling false positive warnings in delegation. This is just for 2.7 migration path. Can we commit this? -
09:36 PM Misc #16160 (Open): Lazy init thread local storage
- References PR https://github.com/ruby/ruby/pull/2295
### Why?
The `local_storage` member of execution context is lazy initialized and drives the `Thread#[]` and `Thread#[]=` APIs, which are Fiber local and not Thread local storage.... -
09:26 PM Revision d8a4af47 (git): Only use `add_mark_object` in Ripper
- This patch changes parse.y to only use `add_mark_object` in Ripper.
Previously we were seeing a bug in write barrier verification. I had
changed `add_mark_object` to execute the write barrier, but the problem
is that we had code like th... -
09:26 PM Revision 4524780d (git): Revert "Reverting node marking until I can fix GC problem."
- This reverts commit 092f31e7e23c0ee04df987f0c0f979d036971804.
-
09:16 PM Feature #16155: Add an Array#intersection method
- connorshea (Connor Shea) wrote:
>
> ...
The question should be: is it needed? -
07:10 PM Feature #16155: Add an Array#intersection method
- shevegen (Robert A. Heiler) wrote:
> You could consider adding this to the upcoming developer meeting:
> ...
Thanks, I will :)
After thinking about the proposal a bit more, one other thing I wanted to ask was about whether we should... -
09:40 AM Feature #16155: Add an Array#intersection method
- I sort of agree with your reasoning. A slight add-on, though,
on that part:
> This would essentially just be a more readable alias for Array#&
It is probably easier to search for it (e. g. a google-search for
.intersection) than ... -
04:52 AM Feature #16155 (Closed): Add an Array#intersection method
- `Array#union` and `Array#difference` were added in Ruby 2.6 ([see this bug](https://bugs.ruby-lang.org/issues/14097)), but an equivalent for `&` (intersection) was not.
I'd like to propose `Array#intersection`. This would essentially ... -
07:36 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- Dan0042 (Daniel DeLorme) wrote:
> I've compiled your delegate-keyword-argument-separation branch to test this. BTW in your example it should be `respond_to?(:pass_positional_hash, true)`
> ...
Thank you for working on this and providin... -
05:09 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- I've compiled your delegate-keyword-argument-separation branch to test this. BTW in your example it should be `respond_to?(:pass_positional_hash, true)`
The portability result is... Almost there, but not quite. In 2.6 and 2.7, `o.empt... -
02:22 PM Misc #16157: What is the correct and *portable* way to do generic delegation?
- I haven't tested this, but I think it should work the same between 2.0 - 3.0 (assuming #16154 is accepted):
```ruby
class ProxyWithKW < BasicObject
def initialize(target)
@target = target
end
def method_missing(*a, **o,... -
02:10 PM Misc #16157 (Open): What is the correct and *portable* way to do generic delegation?
- With the keyword argument changes in 2.7 we must now specify keyword arguments explicitly when doing generic delegation. But this change is not compatible with 2.6, where it adds an empty hash to the argument list of methods that do not ...
-
05:18 PM Bug #16159: rubyspec about time fails in Asia/Kuala_Lumpur timezone
- Ran it 3 times and oddly enough they all fail at `Expected 1932 to equal 1933`
-
05:09 PM Bug #16159 (Closed): rubyspec about time fails in Asia/Kuala_Lumpur timezone
- Steps to reproduce:
1. Check out current master from Github (89c5d5a64e12cea23b230913b79c3d499bf30b12)
2. Run `autoconf`
3. Run `./configure`
4. Run `make check -- --with-openssl-dir=/usr/local/opt/openssl/lib`
Result:
```
... -
05:16 PM Bug #12984: `rescue *[]` should be equivalent to `rescue` as `method_call(*[])` is equivalent to `method_call`
- > I think it's is less surprising than rescue *no_classes to "magically" rescue StandardError
It is the current behavior that's magical. If you try to deduce what `rescue *[]` means from the primitives, it goes like this:
- `*[]` ... -
05:12 PM Feature #16146: Array .difference allow custom comparison
- As recommended I'll place in example directly here:
The feature I am requesting is to allow custom comparison of the Array #difference.
Currently it is comparing with each item's #eql and #hash but in the case of Objects you would ne... - 03:57 PM Revision 9b53a69d (git): * 2019-09-10 [ci skip]
-
03:56 PM Revision 6d9e5481 (git): Support multibyte input
-
03:56 PM Revision 685f12bb (git): Use IO#getbyte
-
03:56 PM Revision 805b0a48 (git): Use IO#getch to read one char in raw mode
-
02:22 PM Bug #16154: lib/delegate.rb issues keyword argument warnings
- This is an issue for *all* delegation code. This `pass_positional_hash` workaround is ok for the stdlib, but what about gems? What if a gem wants to stay compatible with 2.6? This is a question I really don't know the answer to, so I'm a...
-
02:35 AM Bug #16154 (Closed): lib/delegate.rb issues keyword argument warnings
- In the current master branch, `lib/delegate.rb` (e.g. `Delegator`/`SimpleDelegator`/`DelegateClass`) does not delegate keyword arguments, leading to keyword argument warnings when using it. It is simple to fix this by changing it to del...
-
12:27 PM Revision 89c5d5a6 (git): add minimaist C++ check
- This is a test extension so we basically want test failures rather
than a configure breakage but if there is no C++ compiler, we need
no test at all because there will be no chance for the tested
header file to be used later.
This makes... -
12:27 PM Revision 150f514e (git): workaround for C++ 98 const union problem.
- Not the case of recent compilers, but compilers before C++11
rejected ruby.h, like https://ci.appveyor.com/project/ruby/ruby/builds/27225706/job/qjca7dpe204dytbd
This is supposedly because a struct with a member qualified with
a const e... -
12:27 PM Revision 042c436c (git): static member variables must explictly be initialized
- These variables then get their room for storage.
See also https://github.com/ruby/ruby/runs/214042030 -
12:27 PM Revision 1364217b (git): add missing dependency for .travis.yml
-
12:27 PM Revision 92a87269 (git): Revert "save committers' weekend from CI failures"
- This reverts commit 53d21087da078cf999cc4757b03b2ff0fab4c2cf.
-
11:34 AM Revision c4efbf66 (git): Revert "Support timeout for Addrinfo"
- This reverts commit 6382f5cc91ac9e36776bc854632d9a1237250da7.
test failed on Solaris. -
11:24 AM Revision cce6cfbe (git): Make test-all and test-spec runnable on Android
- Calling some syscall functions such as Dir.chroot causes SIGSYS instead
of EPERM on Android.
This change skips all tests that stops the test-suite run. -
11:06 AM Revision 0691a748 (git): Fix a typo [ci skip]
-
10:23 AM Bug #16007 (Assigned): Process.clock_getres matches the clock in practice for Process::CLOCK_{PROCESS,THREAD}_CPUTIME_ID FAILED fails on armv7hl
- Thx.
However, I wonder if there is some explanation for disabling the test. I see a lot of comments such as `# These clocks in practice on Linux do not seem to match their reported resolution.` or `# These clocks in practice on ARM on... -
10:16 AM Revision 551edf64 (git): Reline: Fix wrong variable name
- This raised a NameError before.
-
09:44 AM Revision 8c09de38 (git): Fix expected ip_port
-
09:35 AM Revision 0fb2457d (git): Fix service name for test
- change service name to fix failed test on Solaris
-
06:39 AM Feature #15553 (Closed): Addrinfo.getaddrinfo supports timeout
- committed in 6382f5cc91ac9e36776bc854632d9a1237250da7
-
06:05 AM Revision 461663f5 (git): Fix domain name for test
-
05:47 AM Revision 61d90da2 (git): Fix invalid keyword argument separation warning for delegating calls
- This removes an invalid keyword argument separation warning for
code such as:
```ruby
def foo(arg)
arg
end
kw = {}
foo(*[1], **kw)
```
This warning was caused because the remove_empty_keyword_hash
was set based on a comparison with t... -
05:34 AM Revision 6382f5cc (git): Support timeout for Addrinfo
- Addrinfo.getaddrinfo and .foreach now accepts :timeout in seconds as
a keyword argument. If getaddrinfo_a(3) is available, the timeout will be
applied for name resolution. Otherwise, it will be ignored.
Socket.tcp accepts :resolv_timeou... -
02:36 AM Feature #16150: Add a way to request a frozen string from to_s
- > So, let's make Symbol#to_s frozen?
> ...
That makes sense, and I agree that's the cleanest solution. There's really nothing in the contract that says `to_s` is supposed to return a non-frozen string.
But I can't agree to a backward-i... -
02:15 AM Feature #16153 (Closed): eventually_frozen flag to gradually phase-in frozen strings
- Freezing strings can give us a nice performance boost, but freezing previously non-frozen strings is a backward-incompatible change which is hard to handle because the place where the string is mutated can be far from where it was frozen...
-
01:12 AM Bug #16136: String corruption in 2.6.4
- Our blog system was fixed at commit:ade1283ca276f7d589ffd3539fbc7b9817f682d5
-
01:03 AM Bug #16148 (Third Party's Issue): bugs.ruby-lang.org is not sending email notifications for watched issues
- Can you file this to https://github.com/ruby/bugs.ruby-lang.org/issues?
Our tracker only handles the language issues.
09/08/2019
-
11:02 PM Bug #16151: [PATCH] Fix a class of fstring related use-after-free
- That general approach sounds good to me, but please let me mention some caveats.
```diff
@@ -1308,8 +1310,6 @@ str_new_frozen(VALUE klass, VALUE orig)
RBASIC(str)->flags |= RBASIC(orig)->flags & STR_NOFREE;
RBASIC(orig)... -
07:01 AM Bug #16151: [PATCH] Fix a class of fstring related use-after-free
- Probably, `STR_IS_SHARED_M` string must not get its buffer replaced.
And I don't think that memory leaks, resulted by setting `STR_NOFREE` regardless the original string, is acceptable.
Although I'm not sure why it is restricted to `... -
03:36 AM Bug #16151: [PATCH] Fix a class of fstring related use-after-free
- My reading is that `STR_NOFREE` exists solely for strings that point to C string literals. It exists to prevent `free("literal")` which is UB.
There are checks for `STR_NOFREE` everywhere buffers are freed in case a static string shows ... -
12:59 AM Bug #16151: [PATCH] Fix a class of fstring related use-after-free
- In addition to `STR_NOFREE` , there are more two things that I cannot understand about string representation.
* What relation is between `STR_NOFREE` and `STR_IS_SHARED_M`? `STR_IS_SHARED_M` seems to be the flag for a shared root, bu... -
12:45 AM Bug #16151: [PATCH] Fix a class of fstring related use-after-free
- Hi @alanwu , thank you for taking time to this issue.
I may be wrong, but I think that the code path you pointed is benign itself. It calls `str_replace_shared_without_enc` which may free the string buffer. However, it does not fre... -
08:16 PM Feature #16150: Add a way to request a frozen string from to_s
- ashmaroli (Ashwin Maroli) wrote:
> Similar to `Symbol#to_s`, even `nil.to_s` allocates a new string.
Right, as mentioned in the description, nil, true and false#to_s could all be frozen and cached the same way as for Symbol#to_s.
Al... -
10:52 AM Feature #16150: Add a way to request a frozen string from to_s
- For methods that convert object to a string, we already have three:
* `to_s`
* `to_str`
* `inspect`
Adding yet another method (or an option for an existing method) would make the picture too complicated. It might be a good time t... -
10:10 AM Feature #16150: Add a way to request a frozen string from to_s
- Similar to `Symbol#to_s`, even `nil.to_s` allocates a new string.
``` shell
irb(main):001:0> 5.times { p nil.to_s.__id__ }
21118460
21118340
21118180
21118100
21118000
```
IMO, since `nil` is a singleton, `nil.to_s` should als... -
09:58 AM Feature #16150: Add a way to request a frozen string from to_s
- PR at https://github.com/ruby/ruby/pull/2437
-
09:40 AM Feature #16150: Add a way to request a frozen string from to_s
- I also tried this version which always returns the same String for a given Symbol:
```diff
diff --git a/string.c b/string.c
index 05ce0ed8d6..f306c905bc 100644
--- a/string.c
+++ b/string.c
@@ -10866,7 +10866,7 @@ sym_inspect(VAL... -
09:28 AM Feature #16150: Add a way to request a frozen string from to_s
- How about specifically making Symbol#to_s return a frozen String?
I tried this trivial patch:
```diff
diff --git a/string.c b/string.c
index 05ce0ed8d6..1a0fa48a6a 100644
--- a/string.c
+++ b/string.c
@@ -10866,7 +10866,9 @@ sym... -
02:52 AM Feature #16150: Add a way to request a frozen string from to_s
- > For example, String#to_s returns itself and mutating sth.to_s is therefore not safe if sth can be a String.
`String#to_s` is of course a special case. But that means if a string is currently not frozen, `to_frozen_string` would have... -
02:19 AM Feature #16150: Add a way to request a frozen string from to_s
- > For example, String#to_s returns itself and mutating sth.to_s is therefore not safe if sth can be a String.
This is a very good point. I'd love to see all immutable core types start returning frozen string but I didn't want to push ... -
08:09 PM Misc #16152: DevelopersMeeting20190919Japan
- * [Feature #16150] Add a way to request a frozen string from to_s
* Can I commit https://github.com/ruby/ruby/pull/2437 (make Symbol#to_s frozen)? It seems compatible enough. What about making true/false/nil#to_s return a frozen cache... -
03:49 PM Misc #16152: DevelopersMeeting20190919Japan
- * [Bug #12984] `rescue *[]` should be equivalent to `rescue` as `method_call(*[])` is equivalent to `method_call`
* I think the current behavior is expected. Can matz confirm?
* [Bug #11022] opening an eigenclass does not change the ... -
12:44 PM Misc #16152 (Closed): DevelopersMeeting20190919Japan
- Please comment on your favorite ticket numbers you want to ask to discuss with your *SHORT* comment or summary.
(your summary/comment will help us because we don't need to read all of the ticket comments)
*DO NOT* discuss then on thi... -
05:34 PM Revision fa792193 (git): Add keyword argument separation tests for implicit/explicit super calls
- No code changes are necessary, but we didn't have as extensive
tests for these calls previously. - 03:27 PM Revision d636feb6 (git): * 2019-09-09 [ci skip]
-
03:21 PM Revision 8d53b2cd (git): Use target-specific variable instead of a conditional [ci skip]
- And test-rubyspec is deprecated.
-
12:41 PM Misc #15996 (Closed): DevelopersMeeting20190829Japan
-
12:22 PM Revision 3ef76ce4 (git): make-snapshot: -git option is no longer provided [ci skip]
-
10:41 AM Revision b10940a8 (git): Improve Proc#to_s specs
-
03:54 AM Revision aedf6946 (git): Removed useless braces to suppress a warning
09/07/2019
-
07:56 PM Feature #16122: Data: simple immutable value object
- @palkan I have a strong **feeling** of "value object notion should be a part of the language, not an externally implemented optional thingy", but it is not easy to rationalize it.
Maybe the thing is that "value object" is a notion mos... -
07:09 PM Bug #16151 (Closed): [PATCH] Fix a class of fstring related use-after-free
- Pull request: https://github.com/ruby/ruby/pull/2435
## The bug
Run the following against master(e9bc8b3) to observe use-after-free:
```ruby
-('a' * 30).force_encoding(Encoding::ASCII)
a = ('a' * 30).force_encoding(Encoding::A... -
06:26 PM Revision e9bc8b35 (git): Behave ESC key correctly when vi command mode
-
06:17 PM Revision 46bfe907 (git): compile.c (compile_hash): rewrite keyword splat handling
- and add some comments.
(I confirm that `foo(**{})` allocates no hash object.) -
06:17 PM Revision 95297a15 (git): compile.c (compile_hash): rewrite the compilation algorithm
- This is a similar refactoring to 8c908c989077c74eed26e02912b98362e509b8a3,
but the target is compile_hash. -
06:07 PM Revision 35680298 (git): Remove .document and .gitignore from file list of rdoc.gemspec
-
04:22 PM Revision 4f63634a (git): compile.c (NODE_OP_ASGN1): Remove unneeded DECL_ANCHOR
-
03:48 PM Revision 2d017d61 (git): make-snapshot: default to the toplevel directory
- As this tool has been intended to use in a working directory,
assume that the toplevel directory is under the VCS, and SVN will
no longer be canonical. -
03:28 PM Revision a3f5265f (git): parse.y: Use the correct alias for brace flag of hash literal
- nd_alen and nd_brace is the same field, but nd_brace is more suitable
for this case. -
03:28 PM Revision 95f9d7c7 (git): compile.c (keyword_node_p): Refactor out keyword node checks
-
03:28 PM Revision 86b74d1a (git): compile.c (compile_hash): Remove redundant check for NODE_ZLIST
- NODE_ZLIST case is handled in compile_hash, so iseq_compile_each0
doesn't have to do the same check redundantly. -
03:28 PM Revision 050f67c9 (git): compile.c (compile_hash): Simplify the keyword handling
- The length of NODE_LIST chain in NODE_HASH is always even because it
represents key-value pairs. There is no need to check for the
odd-length case. -
03:28 PM Revision bb78c836 (git): compile.c (compile_hash): don't add a temporal array to mark_ary
- The array is just for a temporal buffer to create a hash, not stored in
the final iseq. -
03:28 PM Revision 7cba9a84 (git): compile.c (compile_array): undef a temporal macro
- 03:23 PM Revision b543f5b2 (git): * 2019-09-08 [ci skip]
-
03:22 PM Revision f3bae2c6 (git): Touch copied cache files to make tarballs stable
-
03:22 PM Revision 5a6954ba (git): Suppress detached head warning
-
02:13 PM Revision ae8b9777 (git): Avoid defining DISPATCH_ARCH_DEPEND_WAY macro
- when it's not used. This macro is not used when it's direct threaded code.
This patch is purely for readability and has no impact for any behavior. -
01:43 PM Bug #16136: String corruption in 2.6.4
- graywolf (Gray Wolf) wrote:
> Out of curiosity, why is this issue closed if it was not yet backported to 2.6 branch?
Don't worry. The branch maintainers, @nagachika and @usa, are going to check all tickets whose "Backport" field is ... -
11:25 AM Bug #16136: String corruption in 2.6.4
- Out of curiosity, why is this issue closed if it was not yet backported to 2.6 branch?
-
06:53 AM Bug #16136: String corruption in 2.6.4
- @mame I'm sorry you had to do extra work to figure that out! I'll post proper reproduction steps next time :)
-
04:48 AM Bug #16136: String corruption in 2.6.4
- @vcsjones Good to hear! Thank you for confirming. And your investigation by bisect was very helpful.
@deivid The most difficult part for me was to read .circleci/config.yml to reproduce the issue on my machine :-) - 01:22 PM Revision a9b63db3 (git): * remove trailing spaces. [ci skip]
-
01:08 PM Revision 8c908c98 (git): compile.c (compile_array): rewrite the compilation algorithm
- The original code looks unnecessarily complicated (to me).
Also, it creates a pre-allocated array only for the prefix of the array.
The new code optimizes not only the prefix but also the subsequence that
is longer than 0x40 elements.
... -
12:18 PM Misc #15723: Reconsider numbered parameters
- @matz Thank you for the decision, I agree _1 is more readable than @1.
I'm a bit sad to hear that @marcandre's point about "it's only really useful for 1 unnamed argument" isn't used in this decision.
What will be the semantics of ... -
12:05 PM Feature #16150: Add a way to request a frozen string from to_s
- Great idea.
This definitely has to be a new method because using `to_s(frozen: true)` would require to know if the object supports the `frozen` keyword for its `to_s` method.
As a method, the default implementation would be `to_s(*... -
11:27 AM Feature #16150: Add a way to request a frozen string from to_s
- Just a short comment - I originally had to write more, but I think my statement would
be too diluted.
> Also, to_s definitions for user classes seem likely to already return
> ...
IMO, it currently can not be assumed to hold true be... -
09:29 AM Feature #16150: Add a way to request a frozen string from to_s
- Another possibility: make/let #to_s methods of core types return frozen strings.
The general contract of `to_s` would become: "return a String representing the object, which might be frozen. Use `.to_s.dup` if you need a mutable string"... -
08:51 AM Feature #16150: Add a way to request a frozen string from to_s
- Another idea: #to_z
-
05:22 AM Feature #16150: Add a way to request a frozen string from to_s
- Thank you for writing up the proposal. This would certainly helped my optimization case. Here’s the PR I referenced in my talk where I had to work around the allocations from calling to_s on a symbol: https://github.com/rails/rails/pull...
-
05:10 AM Feature #16150 (Open): Add a way to request a frozen string from to_s
- Much of the time when a user calls to_s, they are just looking for a simple string representation to display or to interpolate into another string. In my brief exploration, the result of to_s is rarely mutated directly.
It seems that ... -
11:40 AM Feature #16131: Remove $SAFE, taint and trust
- I agree it would be best to remove the implicit taint state, and particularly the interaction with $SAFE.
FWIW, TruffleRuby already prevents setting $SAFE to anything else than 0:
https://github.com/oracle/truffleruby/blob/master/doc... -
11:25 AM Revision 07876bf6 (git): compile.c (compile_hash): refactoring
- The same refactoring as to b601b13c7267889bf394146353c5f2b0eb488278.
-
11:25 AM Revision 187328b7 (git): compile.c (compile_array): refactoring
- "popped" case can be so simple, so this change moves the branch to the
first, instead of scattering `if (popped)` branches to the main part.
Also, the return value "len" is not used. So it returns just 0 or 1. -
11:05 AM Feature #16137: Add === to UnboundMethod
- With the new pattern matching:
```ruby
case 11
in n if n.positive?
p :positive
end
```
Isn't that more readable and general? -
10:56 AM Bug #16007: Process.clock_getres matches the clock in practice for Process::CLOCK_{PROCESS,THREAD}_CPUTIME_ID FAILED fails on armv7hl
- I fixed the spec.
Those clocks were already excluded for armv7l but not armv7hl, so I generalized to armv7. -
10:55 AM Bug #16007 (Closed): Process.clock_getres matches the clock in practice for Process::CLOCK_{PROCESS,THREAD}_CPUTIME_ID FAILED fails on armv7hl
- Applied in changeset commit:git|324dd9d01f0c97631a2588f63231bcb651844cca.
----------
armv7l and armv7l are the same platform, generalize to armv7
[Bug #16007] -
10:53 AM Revision 324dd9d0 (git): armv7l and armv7l are the same platform, generalize to armv7
- [Bug #16007]
-
10:06 AM Bug #12984: `rescue *[]` should be equivalent to `rescue` as `method_call(*[])` is equivalent to `method_call`
- The core of this is that `rescue` (which means rescue StandardError) vs `rescue *classes` (which means rescue any of `classes`) is detected at parse time, not at runtime.
I think the current logic makes sense in that regard, and I think... -
09:57 AM Feature #12543: explicit tail call syntax: foo() then return
- duerst (Martin Dürst) wrote:
> We want programs to be fast, and tail call optimization makes them faster.
That's not true in general.
It might make recursive methods faster, but it makes normal methods calls that happen at the end o... -
08:24 AM Feature #12543: explicit tail call syntax: foo() then return
- Dan0042 (Daniel DeLorme) wrote:
> Questions:
> ...
That's heavier than a normal method call; we don't "keep" a `Thread::Backtrace::Location` now. Instances of that class are constructed on-the-fly when necessary. However if we do a "pa... -
08:26 AM Revision 55112134 (git): Exit gently if no VCS found but --suppress_not_found is given
-
08:26 AM Revision 5b5c9b61 (git): Removed no longer used variable
-
07:45 AM Revision a2260bd6 (git): compile.c: Separate compile_list to two functions for Array and Hash
- compile_list was for the compilation of Array literal and Hash literal.
I guess it was originally reasonable to handle them in one function, but
now, compilation of Array is very different from Hash. So the function
was complicated by m... -
07:26 AM Revision 2f2f8107 (git): compile.c (compile_list): allow an odd-length hidden array literal
- An array literal [1,2,...,301] was compiled to the following iseq:
duparray [1,2,...,300]
putobject [301]
concatarray
The Array literal optimization took every two elements maybe because it
must handle not only Array but also Has... -
07:05 AM Revision 1e008105 (git): compile.c (compile_list): emit newarraykwsplat only at the last chunk
- `[{}, {}, {}, ..., {}, *{}]` is wrongly created.
A big array literal is created and concatenated for every 256 elements.
The newarraykwsplat must be emitted only at the last chunk. -
05:03 AM Revision c725a4e4 (git): Check github.repository in doxygen.yml [ci skip]
-
04:56 AM Revision a7a2be7a (git): Rename some function/definition names that handles NODE_LIST
- from array to list.
Follow up to ac50ac03aeb210763730cdc45f230e236519223d -
04:56 AM Revision 99c9431e (git): Rename NODE_ARRAY to NODE_LIST to reflect its actual use cases
- and NODE_ZARRAY to NODE_ZLIST.
NODE_ARRAY is used not only by an Array literal, but also the contents
of Hash literals, method call arguments, dynamic string literals, etc.
In addition, the structure of NODE_ARRAY is a linked list, not ... -
04:50 AM Revision f223ab47 (git): [DOC] Update output of Ripper.sexp [ci skip]
-
02:59 AM Revision 8bfc46a9 (git): Fixed wrong usage of file2lastrev.rb
-
02:56 AM Revision 8b290448 (git): Assign to vcs in new_vcs block not to use rescue result
-
02:47 AM Revision 59e29389 (git): Fixed wrong method at 71f7b0421ac
-
02:41 AM Revision 146677a1 (git): Fix keyword argument warnings in the tests from Class#new
- This were previously hidden because calls from C were not warned.
-
02:41 AM Revision 434582d8 (git): Fix Tempfile.open to correctly pass keywords to Tempfile.new
-
02:41 AM Revision 56036815 (git): Enable keyword argument warnings when called from C
- Previously, Ruby did not warn in these cases, and in some cases
did not have the same behavior. This makes calls from C handled
the same way as calls from Ruby. -
02:41 AM Revision 80e679ef (git): Fix keyword argument separation warnings for enumerators
- This makes objects created via #to_enum and related methods pass
keyword arguments as keywords.
To implement this, add a kw_splat member of struct enumerator and
struct iter_method_arg, and add rb_block_call_kw, which is the
same as rb_... -
02:41 AM Revision 37a2c660 (git): Convert keyword argument to required positional hash argument for Class#new, Method#call, UnboundMethod#bind_call
- Also add keyword argument separation warnings for Class#new and Method#call.
To allow for keyword argument to required positional hash converstion in
cfuncs, add a vm frame flag indicating the cfunc was called with an empty
keyword hash... -
02:38 AM Revision 3fafc549 (git): Fix error when checking file modified with git-svn
-
02:38 AM Revision d783609a (git): Get rid of overwriting revision.h and creating .revision.time
-
02:38 AM Revision 5118aa2d (git): Use `git describe --contains` for tags
-
02:38 AM Revision 3890c9ee (git): Added more debug outputs from VCS::GIT
-
02:38 AM Revision 71f7b042 (git): Refined file2lastrev.rb options
- * check --srcdir if given twice or more
* falls back to the current working directory if no --srcdir
option is given.
* define common VCS options. -
02:38 AM Revision 799de912 (git): Separated VCS.define_options for common VCS options
-
01:48 AM Revision 4068be1d (git): appveyor.yml - msys2 update code
- As AppVeyor's MSYS2 install gets out of date, this may require 'special' code...
This code also adds updating the database, which currently updates gcc from 9.1.0 to 9.2.0. -
12:20 AM Revision 3bb3fa40 (git): eval.c (rb_rescue2): fix a probably wrong return
- This return skips `va_end(ap)`, which is not intended, I guess.
Coverity Scan found this. -
12:14 AM Revision 9c0626fa (git): Upgrade benchmark-driver to v0.15.4
- Fixing a bug on Windows introduced in v0.15.0
09/06/2019
-
11:06 PM Bug #16026 (Rejected): `Set#count` performance issues
- Given the discussion, I'm okay if we just reject this feature. @knu it's up to you if you want to implement it or not. Even thought it can make sense from one POV, the correct solution for most users is just to use `#size` when it's avai...
-
10:31 PM Feature #16144: Honor Logger#level overrides in Logger#add
- jeremyevans0 (Jeremy Evans) wrote:
> Can you please submit this as a pull request to ruby/logger: https://github.com/ruby/logger/pulls
> ...
[Done](https://github.com/ruby/logger/pull/41). -
09:14 PM Feature #16144: Honor Logger#level overrides in Logger#add
- Can you please submit this as a pull request to ruby/logger: https://github.com/ruby/logger/pulls
For feature requests and bug reports for Ruby itself, it's best to open an issue on this bug tracker, but for feature requests and bug f... -
09:30 PM Bug #15830 (Closed): SortedSet's lazy setup causes unpredictable behaviour in subclass's initialize
- Applied in changeset commit:git|258843106f343d05732499dd1832958eb1bf64f0.
----------
Fix SortedSet subclasses that override initialize
The first time SortedSet#initialize is called, it overwrites
itself, then recalls #initialize, which... -
09:20 PM Revision 25884310 (git): Fix SortedSet subclasses that override initialize
- The first time SortedSet#initialize is called, it overwrites
itself, then recalls #initialize, which results in calling the
subclass's initialize, not the current initialize.
Just inline the default initialize behavior to avoid this iss... -
09:01 PM Bug #16149 (Feedback): Segfault during page reload in rails
- Can you please try Ruby 2.5.6 or 2.6.4 and see if the problem has already been fixed? Also, if you can reproduce the issue with one of those versions, please post the entire output from the program, not just the crash file, as the crash...
-
08:48 PM Bug #16149 (Closed): Segfault during page reload in rails
- See attached file
-
05:37 PM Bug #12984: `rescue *[]` should be equivalent to `rescue` as `method_call(*[])` is equivalent to `method_call`
- > The explicit syntax for rescue nothing is rescue *[] :)
Splat is not part of the rescue syntax, it composes with it, the same way it composes with other constructs that take a comma separated list (invocations, not sure if there are... -
05:28 PM Feature #16147: List Comprehensions in Ruby
- sammomichael (Samuel Michael) wrote:
> shevegen (Robert A. Heiler) wrote:
> ...
Yes it is real, and yes, I should have changed it to be a feature and not a bug
> > Next, I will briefly comment on this statement:
> ...
I use Ruby's ... -
04:44 PM Feature #16147: List Comprehensions in Ruby
- There is nothing wrong with the current ruby syntax of using enumerables such as map/select/filter_map to generate the same type of list. But as you said ruby is all about many ways of doing things. And as many languages offer some versi...
-
02:06 PM Feature #16147: List Comprehensions in Ruby
- I am not sure how serious the proposal is; but I will assume, for sake of simplicity, that
the suggestion is "real". First a minor comment - it should be filed under "features"
rather than "bug", since it is a suggestion for a change, ... -
01:18 PM Feature #16147: List Comprehensions in Ruby
- What's wrong with existing well-established object-oriented ruby idioms?
```ruby
(1..10).to_a
(1..10).select(&:even?)
(1..10).select(&:even?).map{ |x| x**2 }
(1..10).map{ |x| x**2 }
```
or in ruby 2.7:
```ruby
(1..10).to_a... -
10:38 AM Feature #16147 (Open): List Comprehensions in Ruby
- ## List comprehensions are present in many languages and programmers are quite fond of their simplicity and power. Add to that the fact that Ruby has a for...in loop that is rarely used but could possibly be repurposed.
### Currently... -
05:17 PM Bug #16148 (Third Party's Issue): bugs.ruby-lang.org is not sending email notifications for watched issues
- I have a gmail address on the bugs.ruby-lang.org account that's active and working. I am not receiving notifications (they are not in spam)
-
03:50 PM Bug #16136: String corruption in 2.6.4
- Wow! Thanks so much for providing this solution in such a timely manner! <3
-
03:13 PM Bug #16136: String corruption in 2.6.4
- I applied the patch to ruby 2.6.4 and I cannot reproduce the issue any more. This patch appears to resolve the issue for 2.6.4. Thank you very much for taking the time to investigate the issue.
```diff
diff --git a/symbol.c b/symbo... -
02:42 PM Bug #16136: String corruption in 2.6.4
- I've committed ade1283ca276f7d589ffd3539fbc7b9817f682d5, which is a workaround for the issue. I confirm that activeadmin test runs successfully with this patch.
I think that this issue is related to the fstring mechanism, but I have ... -
02:35 PM Bug #16136 (Closed): String corruption in 2.6.4
- Applied in changeset commit:git|ade1283ca276f7d589ffd3539fbc7b9817f682d5.
----------
Fix a use-after-free bug by avoiding rb_str_new_frozen
`str2 = rb_str_new_frozen(str1)` seems to make str1 a shared string that
refers to str2, but st... -
12:58 PM Bug #16136: String corruption in 2.6.4
- I faced the same error maybe.
Our company blog generated by middleman was failed with Ruby 2.6.4 and 2.7.0 built by master branch. This issue was completely reproduced with them. We could build with Ruby 2.5.6.
I will investigate ... -
10:40 AM Bug #16136: String corruption in 2.6.4
- @vcsjones You're right, my raw guess at the culprit was wrong since I just got the issue again with the ruby I built excluding the commits I mentioned. I'm going to build the same ruby you built now to confirm that the culprit is https:/...
-
12:16 AM Bug #16136: String corruption in 2.6.4
- I wonder if these bugs exist on master or are specific to 2.6.4.
- 03:45 PM Revision 2d076dd5 (git): * 2019-09-07 [ci skip]
-
03:43 PM Revision bb53ddfe (git): Upgrade benchmark-driver to v0.15.3
- It got some nice features for better support of
benchmark_driver-output-charty, Windows, ridk, and rbenv. -
02:35 PM Revision ade1283c (git): Fix a use-after-free bug by avoiding rb_str_new_frozen
- `str2 = rb_str_new_frozen(str1)` seems to make str1 a shared string that
refers to str2, but str2 is not marked as STR_IS_SHARED_M nor
STR_NOFREE.
`rb_fstring(str2)` frees str2's ptr because it is not marked, and the
free'ed pointer is t... -
01:15 PM Revision 055b4410 (git): VCS::GIT no longer accepts remote repository
-
09:43 AM Revision 733aa2f8 (git): Stop setting same flags as cflags to cxxflags
-
09:43 AM Revision dd26c9f3 (git): Check clang++ as CXX when CXX is bare clang without suffix
-
09:20 AM Revision 53d21087 (git): save committers' weekend from CI failures
- Kill the failing tests.
-
08:47 AM Revision 99bfa6c1 (git): Try to fix compile error on win32
- https://github.com/ruby/ruby/runs/213995386#step:7:810
```
cxxanyargs.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_malloc.h(54): error C2485: '__restrict': unrecognized extended attribute
``` -
08:39 AM Feature #16146: Array .difference allow custom comparison
- Seems to be the same link as https://bugs.ruby-lang.org/issues/16118; so perhaps accidental double
post; could close one of these two - or perhaps both. :D
As there was not yet any comment on the other post, I'll comment briefly here... -
02:05 AM Feature #16146: Array .difference allow custom comparison
- Please provide an actual usage example directly in this issue, not only by reference.
-
07:52 AM Revision 1851dc26 (git): avoid name mangling
- Otherwise the dynamic linker cannot find this function.
See also https://ci.appveyor.com/project/ruby/ruby/builds/27224231/job/4pg6lxlsnsjotu2l -
07:42 AM Revision 2aa4fb57 (git): nullptr is a C++11ism.
- Should use numeric 0 for maximum portability.
See also https://travis-ci.org/ruby/ruby/jobs/581543798 -
07:33 AM Revision 7516c48b (git): fix Visual Studio compilation error
- See also https://github.com/ruby/ruby/runs/213964487
-
06:50 AM Revision 04f570e2 (git): add test for cxxanyargs.hpp
-
06:50 AM Revision a569bc09 (git): add include/ruby/backward/cxxanyargs.hpp
- Compilation of extension libraries written in C++ are reportedly
broken due to https://github.com/ruby/ruby/pull/2404
The root cause of this issue was that the definition of ANYARGS
differ between C and C++, and that of C++ is incompati... -
06:50 AM Revision d6a94cff (git): doxygen update [ci skip]
-
05:52 AM Bug #16145: regexp match error if mixing /i, character classes, and utf8
- Definitely a bug. Confirmed on master (ruby -v
ruby 2.7.0dev (2019-07-06T03:43:38Z trunk f296c260ef) [x86_64-cygwin])
"CAFÉ" =~ /x|é/i
works. So that may be an alternative until this is fixed. It may also give some hints on where th... -
04:04 AM Revision 41b7c335 (git): Revert "Add a temporal stack dumper for debugging on trunk-mjit"
- This reverts commit 433c9c00d96124e3b416d0a20ff795b0ad4273fa.
Successfully captured some traces, and
3b60e5e6bc2c84b971bea9c8312eb5d33ada2ff5 seems to fix the issue. -
01:34 AM Revision 3b60e5e6 (git): Try shrinking tested VM stack max
- 12:50 AM Revision dd81af7b (git): * remove trailing spaces. [ci skip]
-
12:47 AM Revision d3cf0eb2 (git): Mark rb_warn_keyword_to_last_hash as static inline
- mame pointed out that vm_args.c is included in vm_insnhelper.c.
-
12:47 AM Revision 5045fe60 (git): Mark rb_warn_keyword_to_last_hash at MJIT_FUNC_EXPORTED
- Hopefully this fixes MJIT errors on AppVeyor.
-
12:47 AM Revision 729de9ee (git): Convert empty keyword hash to required positional argument and warn for method_missing
- This is the same as the bmethod, sym proc, and send cases,
where we don't remove the keyword splat, so later code can
move it to a required positional parameter and warn. -
12:47 AM Revision e220b467 (git): Convert empty keyword hash to required positional argument and warn for sym procs
- This is the same as the bmethod and send cases, where we don't
remove the keyword splat, so later code can move it to to a
a required positional parameter and warn. -
12:47 AM Revision e2878a96 (git): Convert empty keyword hash to required positional argument and warn for lambda and bmethod
- The lambda case is similar to the attr_writer case, except we have
to determine the number of required parameters from the iseq
instead of being able to assume a single required parameter.
This fixes a lot of lambda tests which were swi... -
12:47 AM Revision e7274a8e (git): Convert empty keyword hash to required positional argument and warn
- In general, we want to ignore empty keyword hashes. The only case
where we want to allow them for backwards compatibility is when
they are necessary to satify the final required positional argument.
In that case, we want to not ignore t... -
12:47 AM Revision d1ef73b5 (git): Always remove empty keyword hashes when calling methods
- While doing so is not backwards compatible with Ruby 2.6, it is
necessary for generic argument forwarding to work for all methods:
```ruby
def foo(*args, **kw, &block)
bar(*args, **kw, &block)
end
```
If you do not remove empty keywo... -
12:47 AM Revision 55b96c5d (git): Add a keyword-to-last-hash warning for some case of define_method method
- and lambda.
When define_method is a simple iseq (`define_method(:m) {|x| ... }`),
passing keywords to it (`m(**kw)`) didn't print a warning. -
12:47 AM Revision dd83f7bf (git): define_method should not drop the empty keyword hash
- Similar to 38e9c1bc35d5549575fbb263afff560e97db068e
-
12:47 AM Revision 70f27808 (git): vm_call_bmethod should not drop the empty keyword hash
- Similar to 38e9c1bc35d5549575fbb263afff560e97db068e
-
12:47 AM Revision 252e2990 (git): vm_call_opt_send should not drop the empty keyword hash
- Now the mechanism that conveys kw_splat flag is gradually established,
so the hack to drop the empty keyword hash is not needed for
vm_call_opt_send. -
12:47 AM Revision 4615886c (git): test_method_missing_kwsplat should call the target directly
- not via Object#send which uses a fast path vm_call_opt_send.
-
12:47 AM Revision acee6302 (git): vm_insnhelper.c: Do not read `ci->flag` after CALLER_SETUP_ARG
- Actually, the following call is wrongly warned without this change.
```
class C
def method_missing(x, *args, **opt)
end
end
C.new.foo(k: 1)
# warning: The last argument is used as the keyword parameter
# warning: for `method_mis... -
12:47 AM Revision eda8dcea (git): Add a comment that some ci->flag is inconsistent after CALLER_SETUP_ARG
-
12:47 AM Revision 0bfe3bf4 (git): Ignore an empty keyword splat for attr_reader/writer methods
-
12:47 AM Revision 437ff408 (git): C method should accept a keyword hash (for compatibility with 2.6)
-
12:47 AM Revision c5555e2e (git): CALLER_SETUP_ARG removes an empty keyword hash from argv
- ...only when a "remove_empty_keyword_hash" flag is specified.
After CALLER_SETUP_ARG is called, `ci->flag & VM_CALL_KW_SPLAT` must not
be used. Instead. use `calling->kw_splat`. This is because
CALLER_SETUP_ARG may modify argv and upd... -
12:47 AM Revision a23ddf7f (git): vm_argc.c (vm_caller_setup_arg_kw): "cfunc" argument is no longer used
-
12:47 AM Revision 030b8e5e (git): Set calling->kw_splat = 1 in vm_caller_setup_arg_kw
- There are two styles that argv contains keyword arguments: one is
VM_CALL_KWARG which contains value elements in argv (to avoid a hash
object creation if possible), and the other is VM_CALL_KW_SPLAT which
contains one last hash in argv.
... -
12:47 AM Revision 1fffd331 (git): Fix passing keywords without splats to sym procs, define_method, and method_missing
-
12:47 AM Revision 6f9b8661 (git): Make Symbol#to_proc calls handle keyword arguments
- Make rb_sym_proc_call take a flag for whether a keyword argument
is used, and use the new rb_funcall_with_block_kw function to
pass that information. -
12:47 AM Revision 38dae1d5 (git): If removing an empty keyword splat hash, unset the kw_splat flag
- Otherwise the last positional hash could be considered as the
keyword arguments. -
12:47 AM Revision 7fc874bf (git): Add rb_funcall_with_block_kw
- This is needed for C functions to call methods with keyword arguments.
This is a copy of rb_funcall_with_block with an extra argument for
the keyword flag.
There isn't a clean way to implement this that doesn't involve
changing a lot of... -
12:47 AM Revision e3cb3e11 (git): Set VM_FRAME_FLAG_CFRAME_KW if kw_splat set in vm_yield_with_cfunc
-
12:47 AM Revision fd2ef1a9 (git): Add VM_NO_KEYWORDS
- I think this is easier to read than using literal 0 with comments
in every case where it is used. -
12:47 AM Revision ce04392d (git): Propagate kw_splat information
- The kw_splat flag is whether the original call passes keyword or not.
Some types of methods (e.g., bmethod and sym_proc) drops the
information. This change tries to propagate the flag to the final
callee, as far as I can. -
12:02 AM Revision 3754e155 (git): Warn local variables which conflict with new numbered parameters