Activity
From 09/23/2019 to 09/29/2019
09/29/2019
-
11:41 PM Revision 6fdd7014 (git): Remove VM_NO_KEYWORDS, replace with RB_NO_KEYWORDS
- VM_NO_KEYWORDS was introduced first in vm_core.h, but it is best
to only use a single definition for this. -
11:28 PM Revision 58dfea0c (git): Make direct calls to rb_{obj_instance,mod_module}_{eval,exec} not pass keywords
- In general RB_PASS_CALLED_KEYWORDS should only be set if we are
sure the arguments passed come directly from Ruby. For direct calls
to these C functions, we should not assume that keywords are passed.
Add static *_internal versions of t... -
10:16 PM Revision 59060aad (git): Run test-unit tests in CI
-
10:16 PM Revision 2740b869 (git): Update to latest test-unit
- * See https://github.com/test-unit/test-unit/issues/165
-
10:08 PM Feature #16150: Add a way to request a frozen string from to_s
- I'll get to the point because I think we're starting to discuss unrelated things in this issue.
headius (Charles Nutter) wrote:
> I'd argue it's actually NEVER safe to modify the result of calling `to_s` [...]
Yes, and it has neve... -
07:29 PM Feature #16150: Add a way to request a frozen string from to_s
- > - `-@` could be `dedup`, or `deduplicate`.
`dedup` is an interesting choice because it implies the opposite of `dup`.
Although you might run into naming collisions if / when you extend this functionality to other types. For ex... -
12:29 PM Feature #16150: Add a way to request a frozen string from to_s
- > However it's still not safe to modify it since it would modify the original string too.
IMHO that's two different use cases. Either:
- You want to be sure not to mutate the string, then you use `.dup`
- You don't care about... -
09:01 PM Misc #16188: What are the performance implications of the new keyword arguments in 2.7 and 3.0?
- Eregon (Benoit Daloze) wrote:
> In #14183, keyword arguments became further separated from positional arguments.
> ...
Internally, there are not really performance implications for the choice to treat keyword arguments as a last positi... -
06:27 PM Misc #16188 (Assigned): What are the performance implications of the new keyword arguments in 2.7 and 3.0?
- In #14183, keyword arguments became further separated from positional arguments.
Contrary to the original design though, keyword and positional arguments are not fully separated for methods not accepting keyword arguments.
Example: `... -
07:10 PM Feature #15865: `<expr> in <pattern>` expression
- > We want to ask English speaker about this proposal. Do you feel natural on this syntax?
(I am a native English speaker.) The syntax feels confusing to me. When I read `X in Y`, I expect `Y` to be a collection of things, and `X` to... -
05:56 PM Revision 54d49aeb (git): Update to ruby/spec@2699ea4
-
05:34 PM Revision 869e4f6e (git): Fix or suppress keyword argument separation warnings in util_spec
- Some warnings are because the @o.rb_scan_args call doesn't
include keyword arguments, but the first argument is passed to
rb_scan_args may have a last hash treated as keywords. Those
should be handled using rb_scan_args_kw on Ruby 2.7.
... -
05:31 PM Bug #16186: Calling Net::HTTP from within an #inspect implementation hang when invoked from p
- Current implementation is since r38225 (fe6b2e20e9f17ed2c2900aa72994e075ffdc7124).
I think this was discussed in the mailing list (probably ruby-dev), but I can't find it now.
And I think which should be uninterruptible is only printin... -
04:40 PM Bug #16186: Calling Net::HTTP from within an #inspect implementation hang when invoked from p
- As `Kernel#p` is equivalent to `Thread.handle_interrupt(Object => :never) {puts args.map(&:inspect)}`, all interrupts never be invoked.
-
05:13 PM Revision 070cbe22 (git): Update to ruby/spec@34e6246
-
05:13 PM Revision d51b4e34 (git): Update to ruby/mspec@5dda9fb
-
04:34 PM Revision 2d41c712 (git): Skip default gemspecs spec if the default_specifications_dir cannot be found
-
04:17 PM Revision 59648af2 (git): Suppress keyword argument warning from #step
- * numeric.c (num_step): pass the extracted argument from keyword
argument, not the last argument itself which should have been
warned already. - 04:02 PM Revision f39314a9 (git): * 2019-09-30 [ci skip]
-
04:01 PM Revision a17bc04d (git): Update to ruby/spec@e69a14c
-
04:01 PM Revision f9a9f3c7 (git): Update to ruby/mspec@8cabcef
-
02:03 PM Revision 1c938a72 (git): Update to ruby/spec@519df35
-
02:03 PM Revision 31bb66a1 (git): Update to ruby/mspec@8106083
-
11:57 AM Revision a27dc831 (git): Pass $(XRUBY) to test-bundled-gems.rb since RbConfig.ruby is incorrect for miniruby
-
11:57 AM Revision 4096e4b0 (git): Move the logic to test bundled gems to Ruby code
- * Writing shell scripts in a Makefile is very error-prone.
* TEST_BUNDLED_GEMS_ALLOW_FAILURES seemed to not work before. -
11:57 AM Revision d090e449 (git): Exclude the test-unit bundled gem tests since they also fail since the Time#inspect change
- * See https://github.com/test-unit/test-unit/issues/165
-
11:57 AM Revision e3b11566 (git): Remove continue-on-error for test-bundled-gems
- * Otherwise, it takes a very long time to notice those tests broke.
-
09:55 AM Revision f6f03dca (git): [ruby/stringio] Bump up the version
- https://github.com/ruby/stringio/commit/f0e5027279
-
09:55 AM Revision 7fe253f4 (git): [ruby/stringio] Use rb_funcallv_kw when delegating arguments
- https://github.com/ruby/stringio/commit/5892663e32
-
09:55 AM Revision 68ab4a5e (git): [ruby/stringio] Replaced rb_funcall2 with rb_funcallv
- https://github.com/ruby/stringio/commit/a37ab7c419
-
09:55 AM Revision ef795f9a (git): [ruby/stringio] Dropped older ruby versions
- https://github.com/ruby/stringio/commit/e8065153b8
-
09:55 AM Revision 7f30783a (git): [ruby/stringio] Get rid of String#undump for ruby 2.4 or earlier
- https://github.com/ruby/stringio/commit/4dfd997e0a
-
09:53 AM Revision 94db8cda (git): [ruby/zlib] Fix for older ruby 2.6 or earlier
- https://github.com/ruby/zlib/commit/00ead8cb2c
-
09:47 AM Revision f10c9cb1 (git): [ruby/zlib] Search zlib.c as a gem
- https://github.com/ruby/zlib/commit/8f43b264cd
-
09:04 AM Revision ce477089 (git): [DOC] Fix typos in Array#{to_s,inspect} doc [ci skip]
-
08:28 AM Revision e2d97cff (git): [DOC] stated that Array#to_s calls #inspect [ci skip]
- [ruby-list:50826]
- 04:17 AM Revision 289cad50 (git): * 2019-09-29 [ci skip]
-
04:15 AM Revision 6e1b72ae (git): Upgrade to the latest did_you_mean 1.3.1
-
02:26 AM Feature #16147: List Comprehensions in Ruby
- ## ruby_list_comprehension gem documentation
https://github.com/SammoMichael/Ruby_List_Comprehension
## ruby_list_comprehension gem page
https://rubygems.org/gems/ruby_list_comprehension
Here is a gem to give a better idea what I mea...
09/28/2019
-
04:51 AM Revision 550a6a6b (git): NEWS: marked up `**nil` [ci skip]
-
04:51 AM Revision d474243e (git): NEWS: Added module name to proc and lambda [ci skip]
- RDoc cannot know if bare words are method name or not.
-
04:43 AM Feature #16150: Add a way to request a frozen string from to_s
- Hi,
In message "Re: [ruby-core:95142] [Ruby master Feature#16150] Add a way to request a frozen string from to_s"
on Sat, 28 Sep 2019 04:33:32 +0000 (UTC), headius@headius.com writes:
>Issue #16150 has been updated by headius (Ch... -
04:33 AM Feature #16150: Add a way to request a frozen string from to_s
- > Not exactly, -@ and +@ makes this much simpler
I do like the unary operators, but they also have some precedence oddities:
```
> ...
=> -3
>> (-"foo").size
=> 3
```
And it doesn't work at all if you're chaining method call... -
04:32 AM Bug #15935: Memory leak triggered by String#encode, possibly elsewhere too
- ruby_2_6 r67805 merged revision(s) 8b3774be3dd9f472bddd99e84e3c9fe2ff99d7ac.
-
04:32 AM Revision 78ef2d0f (git): merge revision(s) 8b3774be3dd9f472bddd99e84e3c9fe2ff99d7ac: [Backport #15935]
- Fix memory leak
* string.c (str_make_independent_expand): free independent buffer.
[Bug# 15935]
Co-Authored-By: luke-gru (Luke Gruber) <luke.gru@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches... -
03:46 AM Feature #15973: Let Kernel#lambda always return a lambda
- I have updated my fix for [Bug #15620] to also issue a warning in cases it
returns the argument it receives without modification.
Since both 2.5.x and 2.6.x has [Bug #15620], there may be code in the wild that
depend on the unintend...
09/27/2019
-
11:03 PM Feature #16166: Remove exceptional treatment of *foo when it is the sole block parameter
- matz (Yukihiro Matsumoto) wrote:
> I think the following code behavior is wrong:
> ...
Here's a pull request for that: https://github.com/ruby/ruby/pull/2502
Note that it breaks some tests/specs. I believe the reason methods with k... -
11:00 PM Bug #16181: return from a proc in a module/class body returns out of script. Should be LJE.
- It looked into this behavior, which started in Ruby 2.4 (when top level return started being allowed).
`return` not being allowed directly in class/module body is a parse error, because the parser knows that it cannot be valid. Howev... -
10:49 PM Bug #16121: Stop making a redundant hash copy in Hash#dup
- ko1 (Koichi Sasada) wrote:
> I found that
> ...
I tried doing that and it caused test failures because Hash#replace stop rehashing keys in ruby 2.6. I've opened a bug for that: https://bugs.ruby-lang.org/issues/16187
I've opened ht... -
10:35 PM Bug #16187 (Closed): Hash#replace no longer rehashes keys for small (array table) hashes
- Here is a script that shows the problem
```ruby
mutable_key = [1]
h = { mutable_key => 'a' }
mutable_key[0] = 2
p(h == {}.replace(h))
```
which outputs `true` in ruby 2.5 and lower versions and `false` in ruby 2.6 and later v... -
10:34 PM Bug #16186 (Closed): Calling Net::HTTP from within an #inspect implementation hang when invoked from p
- Using this script:
``` ruby
require 'net/http'
class Victim
def inspect
puts "before"
Net::HTTP.get('example.com', '/index.html') # this hangs. I haven't tried other network libraries
puts "After"
return "success"
end
... -
06:22 PM Revision d53cf854 (git): Fix warning when doing Struct.new(:x, keyword_init: true){}
- This is due to calling rb_mod_module_eval directly instead of using
rb_funcall_passing_block.
The problem with calling directly is it does not create a new VM
frame, so rb_mod_module_eval was called with no arguments, but with
the keywo... -
06:21 PM Revision 7814b6c6 (git): Correctly issue ArgumentError when calling method that accepts no keywords
- If a method accepts no keywords and was called with a keyword, an
ArgumentError was not always issued previously. Force methods that
accept no keywords to go through setup_parameters_complex so that
an ArgumentError is raised if keyword... -
04:44 PM Revision fd0e2141 (git): Update NEWS section on keyword argument separation [ci skip]
- This may be too verbose, if so, maybe it should be moved lower in
the document, or to a separate document. -
04:24 PM Feature #16119 (Closed): Optimize Array#flatten and flatten! for already flattened arrays
- Applied in changeset commit:git|a1fda16b238f24cf55814ecc18f716cbfff8dd91.
----------
Optimize Array#flatten and flatten! for already flattened arrays (#2495)
* Optimize Array#flatten and flatten! for already flattened arrays
* Add benc... -
03:42 AM Feature #16119: Optimize Array#flatten and flatten! for already flattened arrays
- It looks like I made a mistake in my benchmarking of non-flattened arrays, since flatten! from the first iteration would cause further iterations to actually test with a flat array. It looks like the performance for arrays starting with...
- 04:24 PM Revision 707c4885 (git): * 2019-09-28 [ci skip]
- 04:24 PM Revision a1fda16b (git): Optimize Array#flatten and flatten! for already flattened arrays (#2495)
- * Optimize Array#flatten and flatten! for already flattened arrays
* Add benchmark for Array#flatten and Array#flatten!
[Bug #16119] -
02:44 PM Feature #15961 (Closed): Always warn for URI.{,un}{escape,encode}
- Applied in changeset commit:git|869e2dd8c8efc1e7a043c9eee82d97c47befbcc7.
----------
Warn for URI.{,un}{escape,encode}, even if not in verbose mode
The verbose mode warning has been present for almost 10 years.
If we ever plan to remov... -
02:44 PM Bug #14358 (Closed): URI.encode_www_form_component doesn't encode bad chars properly
- Applied in changeset commit:git|a2c26fe1c6d49b54494b7c6301cc4c77596eec0c.
----------
Fix fallback in URI.encode_www_form_component to include #
Patch from Matthew Kerwin.
Fixes [Bug #14358] -
02:44 PM Bug #14429 (Closed): Overzealous escaping of + in Shellwords
- Applied in changeset commit:git|43a16c98df392e726040f0331a3e09d00c53d513.
----------
Do not escape + in Shellwords.escape
+ is not a character that requires escaping in Bourne sh.
Fixes [Bug #14429] -
02:44 PM Bug #14466 (Closed): Errno::ECONNRESET or Errno::EPIPE raised instead of HTTPResponse returned when POSTing with large body
- Applied in changeset commit:git|2b6a9f3a1ffcdb00bf89798979d475c6d189d419.
----------
Ignore Errno::EPIPE when sending requests in net/http
An EPIPE when sending the request should be ignored. Even if you
cannot write more data, you ma... -
02:43 PM Revision 869e2dd8 (git): Warn for URI.{,un}{escape,encode}, even if not in verbose mode
- The verbose mode warning has been present for almost 10 years.
If we ever plan to remove these methods, we should make the warning
a regular deprecation warning so that people are aware.
Implements [Feature #15961] -
02:43 PM Revision a2c26fe1 (git): Fix fallback in URI.encode_www_form_component to include #
- Patch from Matthew Kerwin.
Fixes [Bug #14358] -
02:43 PM Revision 43a16c98 (git): Do not escape + in Shellwords.escape
- + is not a character that requires escaping in Bourne sh.
Fixes [Bug #14429] -
02:43 PM Revision 2b6a9f3a (git): Ignore Errno::EPIPE when sending requests in net/http
- An EPIPE when sending the request should be ignored. Even if you
cannot write more data, you may still be able to read the server's
response.
Fixes [Bug #14466] -
12:54 PM Revision 80d0b6f1 (git): Updated bundled_gems
-
12:43 PM Bug #16185: basictest failure on AIX 6.1 for 64bit build
- @kanemoto @reiodaira Could you treat this?
-
11:58 AM Bug #16185 (Feedback): basictest failure on AIX 6.1 for 64bit build
- We are building ruby 2.6.3(both 32 and 64bit) on AIX 6.1.
The build options used for 64bit build are:-
export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/usr/lib:/lib"
and for 32bit build are:... -
12:17 PM Bug #16184 (Closed): Entry persists in catch table even though its labels were removed, which may cause [BUG]
- Applied in changeset commit:git|79d5332a2da0e2743a77480aebfca256a54a962e.
----------
Drop eliminated catch-entries
Drop catch table entries used in eliminated block, as well as
call_infos. [Bug #16184] -
10:05 AM Bug #16184: Entry persists in catch table even though its labels were removed, which may cause [BUG]
- > And having `position` field of labels initialized (as in my attached patch) makes crash totally impossible.
I think having this field properly initialized is a good idea anyway, so I created a pull request: https://github.com/ruby/r... -
09:33 AM Bug #16184 (Open): Entry persists in catch table even though its labels were removed, which may cause [BUG]
- > So whether Ruby crashes or not depends on the contents of the memory where labels are allocated by compile_rescue function.
And having `position` field of labels initialized (as in my attached patch) makes crash totally impossible. -
09:30 AM Bug #16184: Entry persists in catch table even though its labels were removed, which may cause [BUG]
- > Could you post a reproducer that reliably crashes Ruby?
I guess this is not really possible to crash Ruby reliably via this issue. Here is a reproducer that crashes on my MIPS32 LE machine one out of 20 times or so:
```ruby
puts... -
09:01 AM Bug #16184 (Feedback): Entry persists in catch table even though its labels were removed, which may cause [BUG]
- Could you show the backtrace?
-
12:12 PM Revision 79d5332a (git): Drop eliminated catch-entries
- Drop catch table entries used in eliminated block, as well as
call_infos. [Bug #16184] -
12:07 PM Revision 03284fb9 (git): assert_in_out_err should use FailDesc too
-
11:23 AM Bug #16151: [PATCH] Fix a class of fstring related use-after-free
- ruby_2_6 r67804 merged revision(s) 93faa011d393bb4b5cf31a0cbb46922f0a5e7cdc.
-
11:23 AM Revision 641e3843 (git): merge revision(s) 93faa011d393bb4b5cf31a0cbb46922f0a5e7cdc: [Backport #16151]
- Tag string shared roots to fix use-after-free
The buffer deduplication codepath in rb_fstring can be used to free the buffer
of shared string roots, which leads to use-after-free.
Introudce a new flag to tag str... -
08:35 AM Feature #16183: Hash#with_default
- zverok (Victor Shepelev) wrote:
> Eregon (Benoit Daloze) wrote:
> ...
Well, yes, but at least in my view, `merge` is a two-sided (symmetric) operation. There are two hashes, and you merge them. It would be strange if one of them is cha... -
06:02 AM Feature #16183: Hash#with_default
- > That means a copy of the Hash is necessary on each call to `#with_default`.
Yes, the same way it is for, say, `merge`, and we still use it in a lot of cases even when source hash would be dropped -- for the sake of chainability:
... -
08:12 AM Feature #16150: Add a way to request a frozen string from to_s
- > In order to safely get a frozen string from an object, you must ALWAYS do `some_str.to_s.dup.freeze`. In order to safely get a mutable string from an object, you must ALWAYS do `some_str.to_s.dup`.
Not exactly, `-@` and `+@` makes t... -
04:53 AM Feature #16150 (Closed): Add a way to request a frozen string from to_s
- Applied in changeset commit:git|eff15a269fdc37d2b09cf1dfe8c1b1bf6e377a32.
----------
[EXPERIMENTAL] Make NilClass#to_s, TrueClass#to_s and FalseClass#to_s return a frozen String
* Always the same frozen String for each of these val... -
05:06 AM Revision 8d0ff887 (git): Adjusted spaces [ci skip]
-
05:01 AM Revision 4d3502d5 (git): More tests for [Feature #16150]
-
04:52 AM Revision eff15a26 (git): [EXPERIMENTAL] Make NilClass#to_s, TrueClass#to_s and FalseClass#to_s return a frozen String
- * Always the same frozen String for each of these values.
* Avoids extra allocations whenever calling these 3 methods.
* See [Feature #16150] -
02:39 AM Revision 2082a26d (git): [ruby/fileutils] Bump version to 1.3.0.
- https://github.com/ruby/fileutils/commit/ba3bd6fdfd
-
02:39 AM Revision 49b7805e (git): [ruby/fileutils] Use Gemfile instead of Gem::Specification#add_development_dependency.
- https://github.com/ruby/fileutils/commit/17a9de6d9b
-
02:39 AM Revision d5355123 (git): [ruby/fileutils] Reduce global variables
- https://github.com/ruby/fileutils/commit/ba81f024cf
-
02:39 AM Revision 06c35cfa (git): [ruby/fileutils] Fix cp_r with symlink root on Windows
- Previously this would copy the symlink root as a symlink instead
of creating a new root directory. This modifies the source
to expand it using File.realpath before starting the copy.
Fixes Ruby Bug 12123
https://github.com/ruby/fileut... -
02:39 AM Revision 9792c9d1 (git): [ruby/fileutils] Fix test_cp_r_dev on Windows or other systems without character/block device in /dev
- Previously this would give an error such as:
TestFileUtils#test_cp_r_dev [c:/fileutils/test/fileutils/test_fileutils.rb:455]:
[RuntimeError] exception expected, not.
Class: <TypeError>
Message: <"no implicit conversion of nil into Strin... -
02:39 AM Revision 9494ef8b (git): [ruby/fileutils] Do not break in verbose mode if using FileUtils with a frozen object
- If FileUtils is included into another object, and verbose mode is
used, a FrozenError is currently raised unless the object has the
@fileutils_output and @fileutils_label instance variables.
This fixes things so that it does not attempt... -
02:39 AM Revision 02cd4205 (git): [ruby/fileutils] Skip test_cp_r_socket on JRuby
- https://github.com/ruby/fileutils/commit/20bb9ec789
-
02:39 AM Revision 1d99163a (git): [ruby/fileutils] Make copy methods handle FIFOs and UNIX sockets
- Previously, this was broken. Trying to copy a FIFO would raise a
NoMethodError if File.mkfifo was defined. Trying to copy a UNIX
socket would raise a RuntimeError as File.mknod is not something
Ruby defines.
Handle the FIFO issue usin... -
02:39 AM Revision 366dd9d8 (git): [ruby/fileutils] Update the documentation content and formatting
- https://github.com/ruby/fileutils/commit/b701353c53
-
02:24 AM Revision 660c7e05 (git): Fix more keyword separation issues
- This fixes instance_exec and similar methods. It also fixes
Enumerator::Yielder#yield, rb_yield_block, and a couple of cases
with Proc#{<<,>>}.
This support requires the addition of rb_yield_values_kw, similar to
rb_yield_values2, for p... -
01:20 AM Revision 0c6f3666 (git): Adjusted spaces [ci skip]
09/26/2019
-
11:53 PM Feature #16150: Add a way to request a frozen string from to_s
- Oh I should point out another problem with the current situation...
```ruby
some_str.to_s.freeze
```
The above code is also unsafe right now, because since `to_s` returns self, we're now freezing the original string!
In order ... -
11:49 PM Feature #16150: Add a way to request a frozen string from to_s
- > But granted that this now cause this somewhat weird situation where to_s might or might not return a frozen string. that being said it's already kinda the case
Yeah, this is precisely the problem. It is made even worse by the large ... -
11:14 PM Feature #16150: Add a way to request a frozen string from to_s
- @headius I totally get your opinion on `String#to_s`, however on a very practical standpoint I agree with @eregon:
> Returning a frozen String for String#to_s would just add more allocations, since the current String#to_s just returns... -
09:39 PM Feature #16150: Add a way to request a frozen string from to_s
- I'm glad to see some smaller parts of this are moving forward. A few updates from my end (JRuby):
* Frozen strings from Symbol etc:
We are on board with making Symbol, nil, true, false, and Module all return frozen strings, and hav... -
02:42 PM Feature #16150: Add a way to request a frozen string from to_s
- Then store those objects in global variables, and `rb_gc_register_mark_object`.
-
02:32 PM Feature #16150: Add a way to request a frozen string from to_s
- byroot (Jean Boussier) wrote:
> Over the 502 gems used in the repo, I found 5 impacted gems, all because of `Symbol#to_s`, and all in very minor ways:
A great report. For the record, I add another case I've heard:
* did_you_mean:... -
01:37 PM Feature #16150: Add a way to request a frozen string from to_s
- @nobu Yes that's what I had in mind, but then from what I understand it means we have to lookup the fstring table every time rather than just return a existing pointer. So it's not really an optimisation, is it?
-
01:35 PM Feature #16150: Add a way to request a frozen string from to_s
- Ok, so I just finished updating our application to be compatible with both `Symbol#to_s` and `Module#name` returning frozen strings.
Over the 502 gems used in the repo, I found 5 impacted gems, all because of `Symbol#to_s`, and all in... -
01:23 PM Feature #16150: Add a way to request a frozen string from to_s
- byroot (Jean Boussier) wrote:
> For `nil/true/false` it is a bit trickier because the returned string are ASCII encoded, so I'm not quite sure how to statically create ASCII `fstrings` with the existing APIs.
```C
static VALUE
true... -
11:50 AM Feature #16150: Add a way to request a frozen string from to_s
- > Do you want to do the PR for nil/true/false as well then?
I tried but I'm quite unsure how to do it, so I don't mind if you handle it.
On a side note I'm currently running our test suite with the following monkey patch:
```rub... -
11:26 AM Feature #16150 (Assigned): Add a way to request a frozen string from to_s
- @byroot Great, I merged your PR.
Sorry, I should have asked first if you wanted to do it.
Do you want to do the PR for `nil`/`true`/`false` as well then? -
11:25 AM Feature #16150 (Closed): Add a way to request a frozen string from to_s
- Applied in changeset commit:git|9d0866c7d7b9cbe36a851744a37806e747e0e7a8.
----------
[EXPERIMENTAL] Make Module#name return a frozen String
* Always the same frozen String for a given Module or Class.
* Avoids extra allocations... -
11:00 AM Feature #16150: Add a way to request a frozen string from to_s
- I got the `Module#name` one ready here: https://github.com/ruby/ruby/pull/2487
For `nil/true/false` it is a bit trickier because the returned string are ASCII encoded, so I'm not quite sure how to statically create ASCII `fstrings` wi... -
08:33 AM Feature #16150 (Assigned): Add a way to request a frozen string from to_s
- Reopening, the issue was accidentally closed as I merged the Symbol#to_s change.
I will make a PR for nil/true/false.to_s and Module#name to return a frozen String. -
08:23 AM Feature #16150 (Closed): Add a way to request a frozen string from to_s
- Applied in changeset commit:git|6ffc045a817fbdf04a6945d3c260b55b0fa1fd1e.
----------
[EXPERIMENTAL] Make Symbol#to_s return a frozen String
* Always the same frozen String for a given Symbol.
* Avoids extra allocations whenever calling... -
12:42 AM Feature #16150: Add a way to request a frozen string from to_s
byroot (Jean Boussier) wrote:
> I get you are worried about `String#to_s`, but what about others that have been mentioned here, namely:
> ...
Ok for the experiment.
Matz.-
10:41 PM Revision 293c6c8c (git): Add compaction support to `rb_ast_t`
- This commit adds compaction support to `rb_ast_t`.
-
10:30 PM Revision 37f9213f (git): Fix keyword argument separation issues in Enumerator::Generator#each
- This requires adding rb_proc_call_kw to pass the keyword flag.
-
10:30 PM Revision dd2068ac (git): Add rb_adjust_argv_kw_splat to internal.h
- We are calling this in a few other files, it is better to have it
in a header than adding prototypes to the other files. - 10:01 PM Revision 31339ef4 (git): Honor Syslog::Logger#level overrides
-
09:58 PM Revision f5e8d337 (git): Fix clang errors when pendantic errors enabled
- I've been compiling with:
```
set -lx cflags '-std=c99 -Werror=pedantic -pedantic-errors'
```
But compilation would fail with the following:
```
cont.c:296:90: error: format specifies type 'void *' but the argument has type 'struct ... -
09:49 PM Feature #16183: Hash#with_default
- zverok (Victor Shepelev) wrote:
> So, I propose side-effect-less method, that **is** acceptable for chaining, I believe.
That means a copy of the Hash is necessary on each call to #with_default.
I.e., it would be the same as:
```ru... -
07:23 PM Feature #16183: Hash#with_default
- > Duplicate of #11761
I don't think it is a duplicate, though I haven't clarified an important behavior indeed:
```ruby
h = {a: 1, b: 2}
h2 = h.with_default(3)
h.default # => nil
h2.default # => 3
```
So, I propose side-effec... -
04:36 PM Feature #16183: Hash#with_default
- sawa has it all covered. ;)
The explanation by matz is interesting.
"Use tap. Methods with side-effect should be handled with care. Making it chainable
has little benefit."
Personally I think other names, be these default_set, ... -
03:52 PM Feature #16183: Hash#with_default
- Duplicate of #11761
-
01:01 PM Feature #16183 (Open): Hash#with_default
- Reasons: there is no way, currently, to *declaratively* define Hash with default value (for example, to store it in constant, or use in an expression). Which leads to code more or less like this:
```ruby
FONTS = {
title: 'Arial'... -
08:56 PM Revision 4808afb3 (git): Replace `freeze_string` with `rb_fstring`
-
08:56 PM Revision 0846d488 (git): Remove `iseq_add_mark_object_compile_time`
- This function is just a synonym for RB_OBJ_WRITTEN, so we can just
directly call that. -
08:56 PM Revision 9b6460ca (git): Remove mark array
- We don't use this array anymore so we can remove it
-
08:56 PM Revision e197d9ca (git): Execute write barrier instead of adding to array
- We can mark everything via the instruction objects, so just execute the
write barrier instead of appending to the array -
08:56 PM Revision 98d7583b (git): Pull `iseq_add_mark_object_compile_time` out of `freeze_string`
- `freeze_string` essentially called iseq_add_mark_object_compile_time. I
need to know where all writes occur on the `rb_iseq_t`, so this commit
separates the function calls so we can add write barriers in the right
place. -
08:56 PM Revision f639e046 (git): Pull "mark object" up
- Move the "add mark object" function to the location where we should be
calling RB_OBJ_WRITTEN. I'm going to add verification code next so we
can make sure the objects we're adding to the array are also reachable
from the mark function. -
08:56 PM Revision 50fadefb (git): Scan the ISEQ arena for markables and mark them
- This commit scans the ISEQ arena for objects that can be marked and
marks them. This should make the mark array unnecessary. -
08:56 PM Revision a618d640 (git): Allocate `INSN *` out of a separate arena
-
08:56 PM Revision 3cd8f76f (git): Introduce a secondary arena
- We'll scan the secondary arena during GC mark. So, we should only
allocate "markable" instruction linked list nodes out of the secondary
arena. -
08:56 PM Revision bd017c63 (git): Extract allocation and free functions
- Now we can allocate and free a secondary arena.
-
08:56 PM Revision 451776f1 (git): Pass in arena to allocator
- This is so we can configure a new arena later
-
07:49 PM Feature #11473: Immutable String literal in Ruby 3
- headius (Charles Nutter) wrote:
> If we make the global default to freeze string literals, would `frozen-string-literal: false` for a given file make them mutable?
Yes, in fact shortly after `--enable-frozen-string-literal` was intro... -
05:31 PM Revision dd1e047f (git): NEWS: fixed markups and indent [ci skip]
- C API updates:
* adjusted indent.
* marked up ANYARGS as RDoc. -
05:30 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Eregon (Benoit Daloze) wrote:
> Dan0042 (Daniel DeLorme) wrote:
> ...
That's still incomplete, since it doesn't explain why `_1` doesn't decompose when used in lambdas. If it always decomposes, it'd be more self consistent.
Anyways, I... -
04:13 PM Revision 81191afe (git): Kernel#open may be redefined
-
03:50 PM Bug #16184: Entry persists in catch table even though its labels were removed, which may cause [BUG]
- Could you post a reproducer that reliably crashes Ruby? Interesting issue!
-
01:22 PM Bug #16184: Entry persists in catch table even though its labels were removed, which may cause [BUG]
- Of course, while having some strange cache table entries would be pretty ok if they were not used (like it usually happens on x86_64). To make sure they are never used compiler should initialize the `position` field of the labels. I'm at...
-
01:18 PM Bug #16184 (Closed): Entry persists in catch table even though its labels were removed, which may cause [BUG]
- When `remove_unreachable_chunk` removes the code from within a rescue block, the catch table entry corresponding the block is not removed. Here is a simple reproducer (tested with ruby 2.5.5):
``` ruby
puts "BEGIN"
if false
b... -
03:48 PM Revision 617fa304 (git): NEWS: fixed markups and formatting [ci skip]
- * got rid of inadvertent label lists.
* marked up resolve_feature_path method names.
* fixed indentation of UnboundMethod#bind_call and marked up as
RDoc. -
03:38 PM Revision 876c5fe1 (git): Check the argument size
- Ensure that argument array size does not overflow as `int`, before
cast in thread_do_start after new thread created. - 03:02 PM Revision 3b9cdc59 (git): * 2019-09-27 [ci skip]
-
03:01 PM Revision 95563428 (git): Fix shorten-64-to-32 compile warnings/errors
-
03:01 PM Revision b193041b (git): Fix keyword argument separation issues in Fiber#resume
-
03:01 PM Revision 6b52959e (git): Fix keyword argument separation issues in Thread.new
-
03:01 PM Revision 47d44510 (git): Fix more keyword argument separation issues in Pathname
-
03:01 PM Revision 3959469f (git): Fix keyword argument separation issues in OpenSSL::SSL::SSLSocket#sys{read,write}_nonblock
- It's unlikely anyone would actually hit these. The methods are
private, you only hit this code path if calling these methods
before performing the SSL connection, and there is already a
verbose warning issued. -
03:01 PM Revision 760893d2 (git): Fix keyword argument separation issues in Proc#{<<,>>}
- This requires adding rb_proc_call_with_block_kw.
-
03:01 PM Revision 0aa267f9 (git): Fix keyword argument sepration issues when IO#open calls #to_open
-
02:39 PM Bug #12123 (Closed): FileUtils.ln_s create a '.symlink' file not a symbolic link on windows
- The pull request was merged.
-
02:29 PM Revision 5b9d6469 (git): Fix Module#name news and add a test
-
01:57 PM Revision b29c68e6 (git): Restore ENV, rubygems always sets SOURCE_DATE_EPOCH now
-
01:56 PM Revision c4ec817a (git): Gem::Specification#to_ruby needs OpenSSL
-
01:13 PM Revision 41e3c204 (git): Reduce ISeq size of mjit_exec benchmark
- to avoid unwanted memory pressure
-
11:59 AM Bug #16151: [PATCH] Fix a class of fstring related use-after-free
- Maybe 2.6.4 has same issue.
-
06:30 AM Bug #16151 (Closed): [PATCH] Fix a class of fstring related use-after-free
- Applied in changeset commit:git|93faa011d393bb4b5cf31a0cbb46922f0a5e7cdc.
----------
Tag string shared roots to fix use-after-free
The buffer deduplication codepath in rb_fstring can be used to free the buffer
of shared string roots, w... - 11:25 AM Revision 1070456b (git): * remove trailing spaces. [ci skip]
-
11:25 AM Revision 9d0866c7 (git): [EXPERIMENTAL] Make Module#name return a frozen String
- * Always the same frozen String for a given Module or Class.
* Avoids extra allocations whenever calling Module#name.
* See [Feature #16150] -
10:22 AM Revision c8f71686 (git): Revert the accidentally commits related GitHub Actions
-
09:24 AM Revision 2a490d56 (git): Suppress assert_match warnings.
-
09:07 AM Revision d4a86e40 (git): Assert warnings message for the last argument is keyword parameter.
-
08:48 AM Revision a2af4730 (git): [rubygems/rubygems] Make sure our modifications to kernel.warn work
- And test the fix we're adding.
https://github.com/rubygems/rubygems/commit/6f86637b98 -
08:48 AM Revision 54839f01 (git): [rubygems/rubygems] Fix jruby build
- https://github.com/rubygems/rubygems/commit/cc255b774a
-
08:48 AM Revision 966915d8 (git): [rubygems/rubygems] indent
- https://github.com/rubygems/rubygems/commit/8cdb2fd66f
-
08:48 AM Revision 1eb50337 (git): [rubygems/rubygems] filter dependency type and name strictly.
- Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
https://github.com/rubygems/rubygems/commit/92892bbc3a - 08:48 AM Revision 0b65a7a1 (git): [rubygems/rubygems] Fix test_gem_attr
- https://github.com/rubygems/rubygems/commit/7c5b66f9ef
-
08:48 AM Revision 4f87a158 (git): [rubygems/rubygems] Introduce default prerelease requirement
- https://github.com/rubygems/rubygems/commit/506c5bce49
-
08:48 AM Revision 6134fd7a (git): [rubygems/rubygems] Remove comment not adding much
- https://github.com/rubygems/rubygems/commit/b3b5c2d379
-
08:48 AM Revision 73633683 (git): [rubygems/rubygems] add tests
- https://github.com/rubygems/rubygems/commit/8a7e27381c
-
08:48 AM Revision 1fb44d2b (git): [rubygems/rubygems] Detect libc version, closes #2918
- https://github.com/rubygems/rubygems/commit/1d18b12a26
-
08:48 AM Revision ea5b1361 (git): [rubygems/rubygems] Fix underscore version for bundler itself
- Previously it wouldn't play nice with the bundler version finder.
https://github.com/rubygems/rubygems/commit/d8bb81556d -
08:48 AM Revision ad638a71 (git): [rubygems/rubygems] Added jruby to matrix
- https://github.com/rubygems/rubygems/commit/0832c079c8
-
08:48 AM Revision 769a28d7 (git): [rubygems/rubygems] Removed 2.2
- https://github.com/rubygems/rubygems/commit/7fd2460f76
-
08:48 AM Revision ba8fb735 (git): [rubygems/rubygems] Added rvm workflow for Ruby 2.2 and 2.7
- https://github.com/rubygems/rubygems/commit/d4ba75dfd2
-
08:48 AM Revision 01c90f17 (git): [rubygems/rubygems] Removed the needless configurations
- https://github.com/rubygems/rubygems/commit/7134c49179
-
08:48 AM Revision f5248f6f (git): [rubygems/rubygems] Added the initial workflow file.
- https://github.com/rubygems/rubygems/commit/6405a1e51a
- 08:48 AM Revision 5c872b29 (git): [rubygems/rubygems] Avoid adding OpenSSL::PKey::RSA instances
- https://github.com/rubygems/rubygems/commit/ba021fb4be
- 08:48 AM Revision d1c97ceb (git): [rubygems/rubygems] Update expectation in test_to_ruby_with_rsa_key
- https://github.com/rubygems/rubygems/commit/2e65f7d4ae
- 08:48 AM Revision 2e9c0787 (git): [rubygems/rubygems] Fix indentation in case statement
- https://github.com/rubygems/rubygems/commit/8ac0647659
- 08:48 AM Revision 8f2379b0 (git): [rubygems/rubygems] Make ruby_code method handle OpenSSL::PKey::RSA objects
- https://github.com/rubygems/rubygems/commit/b1d825ab3a
- 08:48 AM Revision 508afe2c (git): [rubygems/rubygems] Set SOURCE_DATE_EPOCH env var if not provided.
- Fixes #2290.
1. `Gem::Specification.date` returns SOURCE_DATE_EPOCH when defined,
2. this commit makes RubyGems set it _persistently_ when not provided.
This combination means that you can build a gem, check the build time,
and use tha... - 08:48 AM Revision 8436b271 (git): [rubygems/rubygems] Add a gem attr to the Gem::Package class.
- https://github.com/rubygems/rubygems/commit/5b81f364ae
-
08:23 AM Revision 6ffc045a (git): [EXPERIMENTAL] Make Symbol#to_s return a frozen String
- * Always the same frozen String for a given Symbol.
* Avoids extra allocations whenever calling Symbol#to_s.
* See [Feature #16150] -
08:04 AM Feature #16182 (Closed): Should `expr in a, b, c` be allowed or not?
- In #15865, a new syntax `<expr> in <pattern>` was introduced. By using this, we can write:
```
json = { foo: 1, bar: 2}
if json in { foo:, bar: }
p [foo, bar] #=> [1, 2]
end
```
However, we cannot write:
```
p(json in... -
07:34 AM Revision 4a4c5028 (git): Add special runner to benchmark mjit_exec
- I wanted to dynamically generate benchmark cases to test various number
of methods. Thus I added a dedicated runner of benchmark-driver. -
07:28 AM Revision 5d8f1125 (git): RubyVM::MJIT.pause(wait: true) should wait
- for all compilations and compaction.
Prior to this commit, the last-compiled code has not been used because
MJIT worker is stopped before setting the code, and compaction has also
been skipped.
But it was not intentional and `wait: tru... -
06:59 AM Bug #16179: ruby binaries generate "already initialized constant" warnings on AIX 6.1
- Yes, it is same as that in irb.
I have attached a log of the output. -
06:43 AM Bug #16179 (Open): ruby binaries generate "already initialized constant" warnings on AIX 6.1
-
06:30 AM Revision 47a23495 (git): Rename STR_IS_SHARED_M to STR_BORROWED
- Since the introduction of STR_SHARED_ROOT, the word "shared"
has become very overloaded with respect to String's internal
states. Use a different name for STR_IS_SHARED_M and explain
its purpose. -
06:30 AM Revision 93faa011 (git): Tag string shared roots to fix use-after-free
- The buffer deduplication codepath in rb_fstring can be used to free the buffer
of shared string roots, which leads to use-after-free.
Introudce a new flag to tag strings that at one point have been a shared root.
Check for it in rb_fstr... -
06:11 AM Feature #15865 (Closed): `<expr> in <pattern>` expression
- Applied in changeset commit:git|3cee99808d629c0ec493955ce8ea019d1f8a637b.
----------
[EXPERIMENTAL] Expression with modifier `in`
[Feature #15865] -
06:10 AM Revision 3cee9980 (git): [EXPERIMENTAL] Expression with modifier `in`
- [Feature #15865]
-
03:46 AM Bug #16135: Segmentation fault in Ruby 2.6.1
- It works in Ruby 2.2.x and Ruby 2.5.x .
-
02:35 AM Revision 1fe73dc8 (git): include/ruby/ruby.h: suppress a false-positive warning of GCC
- GCC emits a lot of false positives for rb_scan_args because:
* `rb_scan_args(argc, argv, "*:", NULL, &opts);` makes `n_mand == 0`,
* `n_mand == argc + 1` implies `argc == -1`, and
* `memcpy(ptr, argv, sizeof(VALUE)*argc);` explodes
How... -
12:59 AM Revision 5357ceb1 (git): [ruby/io-console] Defer creating VT query string
- https://github.com/ruby/io-console/commit/3d69c577a4
-
12:59 AM Revision 9b106987 (git): [ruby/io-console] Added IO#console_mode
- https://github.com/ruby/io-console/commit/77ed8d5a06
09/25/2019
-
08:41 PM Feature #16150: Add a way to request a frozen string from to_s
- > So how about making an experiment by the next preview(2) to see how big the incompatibility is?
Thank you, I will merge https://github.com/ruby/ruby/pull/2437 and mark the change as experimental.
> ...
I agree String#to_s should ... -
05:30 PM Feature #16150: Add a way to request a frozen string from to_s
- @matz Great to hear.
I get you are worried about `String#to_s`, but what about others that have been mentioned here, namely:
- `NilClass#to_s`
- `TrueClass/FalseClass#to_s`
- `Module#name`
-
07:51 PM Bug #16148: bugs.ruby-lang.org is not sending email notifications for watched issues
- test
-
07:35 PM Bug #16154 (Closed): lib/delegate.rb issues keyword argument warnings
- The hash-flag approach for ruby2_keywords has been merged at 3b302ea8c95d34d5ef072d7e3b326f28a611e479. That commit uses ruby2_keywords in delegate, fixing the keyword argument separation issues.
-
07:33 PM Revision 3b302ea8 (git): Add Module#ruby2_keywords for passing keywords through regular argument splats
- This approach uses a flag bit on the final hash object in the regular splat,
as opposed to a previous approach that used a VM frame flag. The hash flag
approach is less invasive, and handles some cases that the VM frame flag
approach do... -
06:25 PM Feature #16168 (Closed): Add keyword argument separation to C functions using rb_scan_args
- matz decided to always treat `:` in `rb_scan_args` as `**opt`, so I have merged my `rb_scan_args-colon-always-keyword` branch at 80b5a0ff2a7709367178f29d4ebe1c54122b1c27.
-
06:18 PM Revision 80b5a0ff (git): Make rb_scan_args handle keywords more similar to Ruby methods (#2460)
- Cfuncs that use rb_scan_args with the : entry suffer similar keyword
argument separation issues that Ruby methods suffer if the cfuncs
accept optional or variable arguments.
This makes the following changes to : handling.
* Treats as *... -
06:05 PM Bug #16181 (Closed): return from a proc in a module/class body returns out of script. Should be LJE.
- return is not allowed from class/module body. But if we insert a return into a block then we can invoke the block then it returns all the way out of the script. This has to be accidental behavior doesn't it? I believe the case below s...
-
04:13 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- matz (Yukihiro Matsumoto) wrote:
> @eregon [ruby-core:95070] beats me. I am persuaded. I agree with:
> ...
Thank you for your decision.
I think this is going to save many bugs and make numbered parameters significantly simpler.
-
04:12 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Dan0042 (Daniel DeLorme) wrote:
> > How would we define the current semantics, without being very complex or confusing?
> ...
That's incomplete, it's much more tricky than that in the now previous semantics:
`_1` is the first numbered... -
12:39 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- > I think `_0` and `_1` are very confusing because people can consider it is sequential meaning. However, the meaning is different.
I agree, but matz chose _0 for the implicit parameter. I think it's a mistake to then use that naming ... -
11:54 AM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- > Beautifully simple:
> ...
I think `_0` and `_1` are very confusing because people can consider it is sequential meaning. However, the meaning is different.
It is same as `$0` and `$1`, but they are completely different feature (pro... -
11:16 AM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Just to make it more polarized, I like the change, it feels more natural.
-
10:44 AM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Dan0042 (Daniel DeLorme) wrote:
> How unfortunate that you managed to persuade matz :-(
Completely agreed. -
10:15 AM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- > How would we define the current semantics, without being very complex or confusing?
Beautifully simple:
_0 is a single implicit parameter, as in x in { |x| }
_1 is the first numbered parameter, as in x in { |x,y,z,etc| }
_2 is th... -
04:02 AM Bug #16178 (Closed): Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Applied in changeset commit:git|55e1e22b2d44a8a1eca0f6ed2b11dc0f564f7192.
----------
Changed numbered parameters semantics
* `_1` (and no other numbered parameters) to work as `|x|`.
* giving up `_0`.
[ruby-core:95074] [Bug #16178] -
03:27 AM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- @eregon [ruby-core:95070] beats me. I am persuaded. I agree with:
* `_1` (and no other numbered parameters) to work as `|x|`.
* giving up `_0`.
Matz. - 03:27 PM Revision 4755e23d (git): * 2019-09-26 [ci skip]
-
03:26 PM Revision ae83dbe2 (git): Get rid of `IO.select` to fix multiline paste
-
11:54 AM Revision 5b1fd79a (git): [DOC] fixed the return value of IO#ready? [ci skip]
- IO#ready? returns true or false only, since r50262(1baa57b0033).
-
11:37 AM Bug #16180 (Rejected): Random.rand(max) ignores / is broken when max ceiling value is a float
- If you want random `Float` values up to `max`, use `Random#rand` or `Random.rand` instead of `Kernel#rand`.
-
11:34 AM Bug #16180: Random.rand(max) ignores / is broken when max ceiling value is a float
- your cases are documented there: https://ruby-doc.org/core-2.6.4/Kernel.html#method-i-rand
`When max.abs is greater than or equal to 1, rand returns a pseudo-random integer greater than or equal to 0 and less than max.to_i.abs.`
`N... -
11:07 AM Bug #16180 (Rejected): Random.rand(max) ignores / is broken when max ceiling value is a float
- ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
ruby 2.7.0preview1 (2019-05-31 trunk c55db6aa271df4a689dc8eb0039c929bf6ed43ff) [x86_64-darwin18]
Calling `rand` with a float of > 1 always return 0.
Calling `rand` with a... -
08:12 AM Revision 6d578164 (git): check `ARY_SHARED_ROOT_P()`.
- ARY_SHARED_ROOT_P(ary) is true, ARY_HEAP_CAPA(ary) should not
be called. -
08:01 AM Revision 3deeb3fd (git): introduce `obj_ary_extracapa`.
- Introduce a new debug counter `obj_ary_extracapa` which counts
arrays which are `len < capa`. -
07:58 AM Revision 112c9f14 (git): lldb_inspect: removed unnecessary newline and `end` option
-
07:14 AM Bug #16179 (Feedback): ruby binaries generate "already initialized constant" warnings on AIX 6.1
- Could you show what `ruby -e 'puts $:'` print, and is it same as in irb?
-
02:33 AM Bug #16179 (Closed): ruby binaries generate "already initialized constant" warnings on AIX 6.1
- We are building ruby 2.6.3(both 32 and 64bit) on AIX 6.1.
The build options used for 64bit build are:-
```
export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/usr/lib:/lib"
```
and for 32... -
07:13 AM Bug #16135 (Third Party's Issue): Segmentation fault in Ruby 2.6.1
- It occurs in KysyCore.dll and the extension library calling that DLL.
Have you asked the author? -
05:10 AM Bug #16135: Segmentation fault in Ruby 2.6.1
- Loading Kysy dll is required in order to run my test cases .
-
04:52 AM Revision 33c5ad31 (git): Removed idNUMPARAM_0
-
04:08 AM Feature #16131: Remove $SAFE, taint and trust
- I've expanded my pull request to deprecate taint/trust and related methods with verbose warnings, and make the methods no-ops. I believe this implements matz's plan for Ruby 2.7.
The changes involved removing tainting from all includ... -
04:01 AM Revision 55e1e22b (git): Changed numbered parameters semantics
- * `_1` (and no other numbered parameters) to work as `|x|`.
* giving up `_0`.
[ruby-core:95074] [Bug #16178] -
03:00 AM Feature #16166: Remove exceptional treatment of *foo when it is the sole block parameter
- I think the following code behavior is wrong:
```ruby
p instance_exec(["a"]){|*foo, **bar| foo } #=> ["a"]
```
It should return `[["a"]]`.
Matz.
-
01:39 AM Revision e663299a (git): Simplified duplicate code
-
12:48 AM Revision c99fb0f4 (git): Revert "[ruby/io-console] Skip cursor position test on Solaris"
- This reverts commit 5294ded681992ced2ecbd31c814b63265d2f591e.
-
12:48 AM Revision ca58e834 (git): Do not use of non-standard escape character '\e'
-
12:43 AM Revision c60451d9 (git): [ruby/io-console] Unique paths to be added
- https://github.com/ruby/io-console/commit/a3ad851b6c
-
12:43 AM Revision fc9eb5b9 (git): [ruby/io-console] Load the current libraries
- https://github.com/ruby/io-console/commit/ab7653c543
09/24/2019
- 11:24 PM Revision 8e8dd88c (git): * 2019-09-25 [ci skip]
-
11:24 PM Revision 5294ded6 (git): [ruby/io-console] Skip cursor position test on Solaris
- It results in a mysterious failure.
https://github.com/ruby/io-console/commit/e3543c3da4 -
10:39 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- It's all about definitions. How do we explain numbered parameters?
Isn't `_1` the first parameter, as in `x` in `{ |x| }` and `x` in `{ |x,y| }`?
And therefore `_2` the second parameter as in `y` in `{ |x,y| }`?
Of course, `{ |x| ... -
10:18 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Here is another inconsistency on current trunk:
```ruby
[1,[2,3]].map { |x| x } # => [1, [2, 3]]
[1,[2,3]].map { |x,| x } # => [1, 2]
[1,[2,3]].map { _1 } # => [1, 2]
[1,[2,3]].map(&-> { _1 }) # => [1, [2, 3]]
[1,[2,3]].map(&... -
10:14 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Dan0042 (Daniel DeLorme) wrote:
> `proc{ |x,| }.arity` == 1, so `_1` is consistent with that.
Which sounds like another bug to me, because that block happily accepts more arguments, and should be identical to `|x,*|`, which `proc {|x... -
09:45 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- zverok (Victor Shepelev) wrote:
> Honestly, we use it pretty frequently in our codebase and find it appealing.
> ...
How frequently compared to just `|x|`? I would guess < 5% on any non-trivial codebase.
But you are right, frequency o... -
09:38 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- `proc{ |x,| }.arity` == 1, so `_1` is consistent with that.
In order to get the tuples' first value you would need to do `array_of_arrays.map{_2;_1}` because otherwise `_1` would mean the entire tuple.
This argument is really weird... -
04:04 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Hmmm. I find underscores to be harder to read in combination with
other parts (e. g. _abc or _123) whereas I use _ quite a bit in my
own code.
I still like @1 @2 @3 etc... - however had, I have to admit that if
the suggestion is to... -
01:53 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Some counter-points (that being said, I dislike the "unnamed parameters" idea as a whole, because I am afraid this feature -- being just "shorter" while staying imperative -- will stay in the way of adoption of more promising features li...
-
01:37 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- nobu (Nobuyoshi Nakada) wrote:
> When `_1` is same as `|x|`, what does `[[1, 2]].map {_1 + _2}` mean?
It means `[[1, 2]].map { |a,b| a + b } # => [3]` of course.
> ...
Yes, just like `Proc#arity` changes.
```ruby
-> { _1 }.arity... -
01:29 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- When `_1` is same as `|x|`, what does `[[1, 2]].map {_1 + _2}` mean?
The meaning of `_1` changes if `_2` is used or not?
-
01:23 PM Bug #16178: Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Of course, having `_` as the only unnamed parameter would have `|x|` semantics,
but I guess it's too late for that and now we have `_<n>` parameters. -
01:21 PM Bug #16178 (Closed): Numbered parameters: _1 should be the same as |x| and _0 should not exist
- Currently on trunk:
```ruby
array = ["string", 42, [1, 2]]
array.map { |x| x * 2 }
# => ["stringstring", 84, [1, 2, 1, 2]]
array.map { _1 * 2 }
# => ["stringstring", 84, 2]
```
Oops, this trivial code just lost data and com... -
10:08 PM Feature #16120: Omitted block argument if block starts with dot-method call
- I ended up rebasing my commits to the latest master and then fiddling with parse.y until I got everything clean and working, including Ripper.
So this is my implementation of omitted parameters based on nobu's original patch:
https://g... -
07:10 PM Bug #16173: ENV.delete returns nil when name does not exist and block given
- I also agree that nobu's patch should be merged.
-
06:31 PM Bug #16173: ENV.delete returns nil when name does not exist and block given
- I, being a member only of The Outer Party, can't merge anything here.
I'm agnostic on whether the change should be to the documentation or to the code. My part was just to note the discrepancy.
Can someone in The Inner Party take ... -
07:08 PM Bug #15244: Method #extname return empty string if filename is dot ('.')
- Example from .NET:
(https://docs.microsoft.com/en-us/dotnet/api/system.io.path.getextension)
```
class Program
{
static void Main(string[] args)
{
string ext = Path.GetExtension("..jpg");
Console.WriteLine(ext);
... -
02:36 PM Bug #16135: Segmentation fault in Ruby 2.6.1
- As KysyCore.dll is included in the backtrace, that is likely to be the cause of the problem. Is it possible for you to test on a system that doesn't have Kysy loaded when running the tests?
-
06:27 AM Bug #16135: Segmentation fault in Ruby 2.6.1
- Kysy is not installed in the machine .
The above call stack is from my development environment which has Kysy codebase but not Kysy library installed -
12:57 PM Revision 0e84eecc (git): Make numbered parameters exclusive in a scope
-
12:57 PM Revision ea68bb91 (git): Changed numbered parameter prefix
-
12:57 PM Revision e73cc3ee (git): Added implicit block parameter
-
12:52 PM Revision a1dcb9da (git): Rename from ruby-x.y.z.ext.draft to ruby-x.y.z-draft.ext [ci skip]
-
12:05 PM Revision c5a97d99 (git): misc/lldb_cruby.py: update for python3 [ci skip]
- lldb module bundled with Xcode is for Python 3 now.
-
11:59 AM Revision 05263660 (git): misc/lldb_cruby.py: removed unused module `commands` [ci skip]
-
10:05 AM Bug #16177 (Closed): Some `*.rb` files on builddir cause Segmentation fault
- How to reproduce:
1. Create dummy files by `./miniruby -e '%w[a b foo bar test zzz].each{|basename|File.write("#{basename}.rb", "raise %(do not load #{basename}.rb)")}'`
2. Run `ruby/test_autoload.rb` like `make test-all TESTS='ruby... -
07:20 AM Revision 10e3267c (git): [ruby/io-console] Made cursor position 0-origin
- https://github.com/ruby/io-console/commit/9377e37295
-
07:20 AM Revision 244f7ec2 (git): [ruby/io-console] Made cursor position consistent with `winsize`
- To be consistent with `winsize`, changed the cursor position
format from `[x, y]` to `[row, column]`.
https://github.com/ruby/io-console/commit/d1f5ae9286 -
03:38 AM Bug #16176 (Third Party's Issue): Segmentation fault running irb on ruby 2.6.4p104 (2019-08-28 revision 67798) [x64-mingw32]
- It seems crashing in ffi-call by rb-readline.
-
02:50 AM Revision 2366c681 (git): suppress meddlesome clang10 warrning
- It says:
vm.c:2519:34: warning: expression does not compute the number of elements in this array; element type is 'const struct __jmp_buf_tag', not 'VALUE' (aka 'unsigned long') [-Wsizeof-array-div]
sizeof(e... -
02:44 AM Revision 14ba62d4 (git): refactor delete unused variable
- cadfaacb2533d47d52dbb5dbefe724d7bf11112e missed it.
09/23/2019
-
11:23 PM Feature #16175: Object#clone(freeze: true) is inconsistent with Object#clone(freeze: false)
- Attached is an alternative approach for implementing this. It uses `VALUE` for the `kwfreeze` variable, so we can use `Qundef` instead of the magic value of `-1` for the default behavior. It also updates the documentation to reflect yo...
-
10:52 PM Bug #16176: Segmentation fault running irb on ruby 2.6.4p104 (2019-08-28 revision 67798) [x64-mingw32]
- Install is from https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.4-1/rubyinstaller-devkit-2.6.4-1-x64.exe however it seems to work fine under git bash (https://gitforwindows.org/)
me@box MINGW64 ~
$ git ... -
09:28 PM Bug #16176 (Third Party's Issue): Segmentation fault running irb on ruby 2.6.4p104 (2019-08-28 revision 67798) [x64-mingw32]
- I'm new to Ruby so bare with me, I have a fresh install of Ruby on a Windows 10 (Build 1803) corporate Dell laptop and getting segmentation fault just trying to launch irb
Dump below
-
10:06 PM Feature #16147: List Comprehensions in Ruby
- Eregon (Benoit Daloze) wrote:
> Just my opinion: I don't think we should have list comprehensions in Ruby.
Thanks I appreciate the feedback!
> ...
You have some very good points! Nested comprehensions can get pretty gnarly. Still... -
09:16 PM Feature #16147: List Comprehensions in Ruby
- nobu (Nobuyoshi Nakada) wrote:
> sammomichael (Samuel Michael) wrote:
> ...
Hi, I was suggesting a splat operator as one way to create a special syntax, under the hood instead of calling each method it would treat this as a filter map... -
08:43 PM Feature #16153: eventually_frozen flag to gradually phase-in frozen strings
- I think it's important to make a distinction between "immutable" and "frozen".
Some programming languages have immutable data structures, and some programmers find that concept really cool, functional, powerful and whatnot. This is a ... -
08:01 PM Bug #16154: lib/delegate.rb issues keyword argument warnings
- When reading the code it seems like the intent of `foo(test:42)` is for baz to return `[{:test=>42}, {}]` but that's not what I get when running it on 2.7. I get a warning and `[1, {:test=>42}]`. To fix the code on 2.7 I need to change `...
-
05:05 PM Feature #16120: Omitted block argument if block starts with dot-method call
- Since I wasn't at the developer meeting I'll post my thoughts/responses to the log here.
> matz: I prefer this style to .map(&:to_s). But I understand it is not flexible enough. Difficult to determine.
This shorthand simplifies one... - 04:28 PM Revision e561e4a8 (git): * 2019-09-24 [ci skip]
-
04:28 PM Revision 74e33662 (git): Make public_send and rb_f_send handle keyword argument separation
- Kernel#send takes a different optimized code path that was already
handled. -
03:12 PM Bug #16135: Segmentation fault in Ruby 2.6.1
- It looks like Kysy is still installed and active according to the C level backtrace:
```
C:\Windows\SYSTEM32\ntdll.dll(RtlCaptureContext+0x3c3) [0x00007ff9c23c9bd3]
E:\code\KYSY-3153\Source\x64\Release\bin\KysyCore.dll(Kysy::PCIAddr... -
09:09 AM Bug #16135: Segmentation fault in Ruby 2.6.1
- It works fine in Ruby 2.5.6 version
-
05:42 AM Bug #16135: Segmentation fault in Ruby 2.6.1
- Please find the error output of Segmentation fault with no Kysy installed.
```
Copying E:/code/KYSY-3153/Source/test/../RegisterDef/data/kysy_platdb.json to E:/code/KYSY-3153/Source/x64/Release/bin directory
Run options: --seed 3459... -
10:29 AM Revision 9e4be78e (git): [ruby/io-console] Try fallback to stdout when stdin
- https://github.com/ruby/io-console/commit/b8017509ef
-
10:24 AM Revision 8487193b (git): [ruby/io-console] Try to write DSR query to writable IO
- https://github.com/ruby/io-console/commit/a54b6e4dd1
-
08:33 AM Revision b443bdbd (git): Use short wait for select(2)
- It is one of the reasons why paste to IRB is slow.
-
08:27 AM Revision 93450747 (git): Retrieve key-buffer that was supposed to lose
-
12:25 AM Bug #16151: [PATCH] Fix a class of fstring related use-after-free
- I ran some quick tests on rejecting frozen non-bare strings from the buffer
deduplication code path. On Discourse, about 18% of calls to rb_fstring are
refused with the change in https://bugs.ruby-lang.org/issues/16151#note-5.
So I do...