Activity
From 06/11/2019 to 06/17/2019
06/17/2019
-
11:58 PM Bug #15933: OpenURI: Assign default charset for HTTPS as well as HTTP
- phluid61 (Matthew Kerwin) wrote:
> So it seems if you're making a change, it should be: ignore the protocol, and default to UTF-8 for `text/csv`.
Or rather: ignore the protocol; and consult the IANA registry to see what the individua... -
11:44 PM Bug #15933: OpenURI: Assign default charset for HTTPS as well as HTTP
- A lot of those quoted specs are very, very old, and in some cases obsoleted by newer specs.
HTTP/1.1 Semantics and Content [RFC7231/B](https://tools.ietf.org/html/rfc7231#appendix-B):
> The default charset of ISO-8859-1 for text me... -
08:40 PM Bug #15933 (Assigned): OpenURI: Assign default charset for HTTPS as well as HTTP
- I think this change makes sense and the patch is the simplest way to implement it.
-
07:14 PM Bug #15933 (Closed): OpenURI: Assign default charset for HTTPS as well as HTTP
- Using `open-uri` to load a document in the following circumstances:
* The `Content-Type` header is `text/*` and *doesn't* specify a charset, e.g. `Content-Type: text/csv`
* The document is loaded from an `https://` URL
…will cause... -
11:46 PM Bug #14194 (Feedback): --enable-frozen-string-literal ruby runner.rb cgi
- Now that it has been decided that Ruby 3 will not use frozen string literals by default, I think we should not assume that code that breaks with `--enable-frozen-string-literal` is buggy, just as we should not assume that code that brea...
-
11:34 PM Bug #14630 (Closed): DON'T IGNORE ME!!! Uncaught exception: SSL_connect returned=1 errno=0 state=error: certificate verify failed (error number 1)
-
11:33 PM Bug #14657 (Closed): Fix build error with LibreSSL 2.7
-
11:31 PM Bug #14810 (Feedback): Segfault during travis build (Ruby trunk 63545)
- Can you reproduce this segfault with 2.6.3 or the master branch?
-
11:25 PM Bug #14875 (Closed): /bin/sh: bad substitution
-
11:13 PM Bug #15082 (Feedback): Memory leak in net/http/response and net/http/header
- alexis (Alexis Bernard) wrote:
> I kept to investigate the memory leak issue. It seems it comes when OpenSSL::SSL::VERIFY_PEER is enabled and a ca_file is specified :
I tried with your example with 2.7.0-preview1 and it is either not... -
10:52 PM Bug #14886: ChangeLog section is obsolete
- I agree, we should fix this. The attached patch is my attempt to do so, removing ChangeLog-specific parts and keeping other parts as a guide for commit messages.
-
10:31 PM Bug #14923 (Closed): Segmentation fault when running tests
-
09:29 PM Misc #15925 (Assigned): Speed up SortedSet#min, #max, #sum etc.?
- Your recommended implementation greatly improves performance. From the benchmark in the attached patch:
```
Calculating -------------------------------------
../ruby2/run_ruby run_ruby
mi... -
09:05 PM Bug #15664 (Closed): File.executable returns incorrect results in Windows 10
- Applied in changeset commit:git|c8edf70cd20b9ff72ebd1e9402a556089f6ff204.
----------
Update documentation for File.executable{,_real}? to mention Windows issues
Fixes [Bug #15664] - 09:05 PM Revision 39a8c714 (git): * 2019-06-18
-
08:57 PM Revision c8edf70c (git): Update documentation for File.executable{,_real}? to mention Windows issues
- Fixes [Bug #15664]
-
08:04 PM Bug #15935 (Closed): Memory leak triggered by String#encode, possibly elsewhere too
- Hi, I've found a leak that can be reproduced in the following way:
```ruby
loop do
puts "running..."
50.times do
File.open("./test/rexml/data/utf16.xml", external_encoding: 'UTF-16LE', binmode: true) do |f| # mus... -
07:50 PM Bug #15934 (Closed): String#b can lead to memory corruption
- The following script triggers use-after-free on trunk(801d0d9), 2.4.6, 2.5.5
and 2.6.3.
```ruby
a = ('j' * 24).b.b
eval('', binding, a)
p a
4.times { GC.start }
p a
```
The consequence is usually that `a` gets corrupted (... -
06:48 PM Bug #15929: Array#minmax is much slower than calling both #min and #max
- janosch-x (Janosch Müller) wrote:
> possible solutions:
> ...
We cannot use this approach. `Enumerable#each` can have side effects, and you cannot iterate twice for `minmax` in the general case. Consider:
```ruby
File.open('...',... -
05:37 PM Feature #15797: Use realpath(3) instead of custom realpath implementation if available
- After discussion with some OpenBSD developers, the non-POSIX behavior of realpath(3) in OpenBSD will be removed in the future (POSIX realpath(3) requires that all components of the path exist). So I've updated the pull request (https://...
-
04:49 PM Bug #9606 (Closed): Ocassional SIGSEGV inTestException#test_machine_stackoverflow on OpenBSD
-
03:17 PM Bug #11174: threads memory leak
- The problem remains on a manually built glibc 2.28 with ruby 2.7.0dev (2019-06-17T14:25:47Z trunk 801d0d9dd7) [x86_64-linux]. So if the problem is related to glibc, the 2.28 version has no fix yet.
-
02:25 PM Revision 801d0d9d (git): Support Bison 3 in ripper
-
01:30 PM Revision c8e9e0b7 (git): Fix wrong "void value expression" error
- * parse.y (value_expr_check): `then` or `else` only `if` is not a
void value expression, as the counterpart is evaluated as `nil`.
[Bug #15932] -
12:56 PM Feature #15921: R-assign (rightward-assignment) operator
- ioquatix (Samuel Williams) wrote:
> If it's not clear, previous statement is evaluated like:
> ...
It can't be higher precedence than `.`, or it will conflict with other syntaxes too much.
Rather it should be interpreted like as:
```... -
12:47 PM Bug #15932 (Closed): wrong "void value expression" error for 'next' or 'break' statements inside an 'if' assignment
- Applied in changeset commit:git|01b3a3804334be19d013526d3edde2b84399ae43.
----------
Fix wrong "void value expression" error
* parse.y (value_expr_check): if either of `then` or `else`
statements is not a void value expression, the w... -
09:27 AM Bug #15932 (Closed): wrong "void value expression" error for 'next' or 'break' statements inside an 'if' assignment
- When a 'next' or 'break' statement for block/loop control is placed inside an 'if' assignment, the parser outputs an error "void value expression". The same parsing error raises for the ternary operator in the same conditions.
I think... -
12:44 PM Revision 01b3a380 (git): Fix wrong "void value expression" error
- * parse.y (value_expr_check): if either of `then` or `else`
statements is not a void value expression, the whole `if` is not
also a void value expression. [Bug #15932] - 10:56 AM Revision 09a84608 (git): * 2019-06-17
-
10:44 AM Feature #15897: `it` as a default block parameter
- Don't think that this proposal can be applied to any words. A common name is much more dangerous than a pronoun like `it` because it is much more frequently used as a method name.
Actually, the count of "def item()" is 20 times more ... -
09:03 AM Feature #15897: `it` as a default block parameter
- sawa (Tsuyoshi Sawada) wrote:
> I propose to use a new keyword `item`.
I think that is a great proposal.
`it` is nice to read when passed to methods of other objects or when used with binary operators:
```ruby
strings.each { p... -
08:38 AM Feature #15897: `it` as a default block parameter
- I propose to use a new keyword `item`.
* I feel that using a keyword spelt in letters is the right way here since keywords like `self` are used in other cases where we reach for things out of the blue without receiving them through ar... -
08:01 AM Feature #15897: `it` as a default block parameter
- Eregon (Benoit Daloze) wrote:
> shugo (Shugo Maeda) wrote:
> ...
`it` doesn't look ugly at first glance, but `it` makes the language semantics dirty as mame admitted in his proposal.
> I think readability matters a lot to many peopl... -
09:40 AM Misc #15930: DevelopersMeeting20190711Japan
- * [Feature #15903] Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path
* matz: Could you decide between `Kernel.resolve_feature_path` and `$LOAD_PATH.resolve_feature_path`?
* [Feature #15897] `it` as a default block par... -
03:20 AM Misc #15930: DevelopersMeeting20190711Japan
- Carry-over tickets.
* [Feature #14912] Introduce pattern matching syntax ([pitr.ch](https://twitter.com/pitr_ch))
* Could the pattern matching be made available as a first-class citizen to be used as a filter when searching in data... -
03:20 AM Misc #15930 (Closed): DevelopersMeeting20190711Japan
- 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... -
07:20 AM Feature #15931 (Assigned): encoding for CESU-8
- RubyとJavaのブリッジを開発していて、文字列の変換処理で困っています。
現象)
JavaのUTF-8は非標準的な形式 (https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/types.html#modified_utf_8_strings) なので、Ruby側の文字列をそのままUTF-8にエンコードして与えると、Java側ではサロゲートペアに相当する文字を正しく認識できません。
お願... -
07:13 AM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- In my own custom, hand-written yaml files I tend to use e. g:
!ruby/symbol foo: bar
for symbols as keys. This would then lead to this Hash, upon
YAML.load_file:
x = YAML.load_file 'foo.yml' # => {:foo=>"bar"}
For pro... -
04:16 AM Feature #15588: String#each_chunk and #chunks
- Is size in characters or bytes?
-
04:13 AM Feature #15588: String#each_chunk and #chunks
- I wonder if we should have consistency with `slice` and `each_slice` from `Array`. But honestly, I don't care, just if it's available.
-
04:11 AM Feature #15588: String#each_chunk and #chunks
- Here is a usecase
https://github.com/socketry/protocol-http2/blob/12875a97e0f82315682191e3bbbaba8b59cb3432/lib/protocol/http2/settings_frame.rb#L236
Because I didn't know `/....../` should be `/....../m` I wasted at least 2 hours o... -
03:15 AM Misc #15874 (Closed): DevelopersMeeting20190613Japan
06/16/2019
-
08:11 PM Bug #15929 (Closed): Array#minmax is much slower than calling both #min and #max
- this is similar to [issue 15807 about Ranges](https://bugs.ruby-lang.org/issues/15807) and maybe also to [13917](https://bugs.ruby-lang.org/issues/13917)
current situation:
- calling `Array#minmax` incurs a performance penalty of a... -
06:09 PM Revision a064e467 (git): Support Bison 3
-
03:29 PM Feature #15799: pipeline operator
- Seeing `|>` my assumption would be that you could use it in the functional style, so you could do:
``` ruby
42 |> Integer(exception: false) |> Math.sqrt
```
Instead of:
```ruby
Math.sqrt(Integer(42, exception: false))
```
S... -
08:11 AM Feature #15799: pipeline operator
- The operator doesn't bother me, though I can't think of any time I'd use it.
Several suggested alternatives seem to want to leave the syntax ambiguous, leaving it unclear whether the piped thing is the receiver or the arg and its uncl... -
12:49 AM Feature #15799: pipeline operator
- At first, I wasn't so sure about how to use such an operator, and honestly, the ASCII symbol `|>` is a bit jarring, but using a font with ligatures you get a better idea of how it's supposed to look, and it does look really great.
I h... -
12:17 AM Feature #15799: pipeline operator
- I investigated history of pipeline operator. It is very long, so I wrote [an article in my blog](https://mamememo.blogspot.com/2019/06/a-brief-history-of-pipeline-operator.html). In short: In my current opinion, the current spec is som...
-
02:52 PM Bug #15916 (Closed): Memory leak in Regexp literal interpolation
- Applied in changeset commit:git|53e9908d8afc7f03109b0aafd1698ab35f512b05.
----------
Fix memory leak
* string.c (str_replace_shared_without_enc): free previous buffer
before replaced.
* parse.y (gettable): make sure in advance that ... -
12:15 AM Bug #15916: Memory leak in Regexp literal interpolation
- I managed to track down the leak, and it's related to rb_fstring().
reg_set_source() calls rb_fstring() with the tainted string, and there's a leak when non-"bare" (ivars or tainted) non-embedded strings are
given to rb_fstring().
... -
02:51 PM Revision 53e9908d (git): Fix memory leak
- * string.c (str_replace_shared_without_enc): free previous buffer
before replaced.
* parse.y (gettable): make sure in advance that the `__FILE__`
object shares a fstring, to get rid of replacement with the
fstring later.
TODO: t... -
02:37 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
- IMO, for `expr::C = lhs`, it should first evaluate `expr` and then do `lhs` because `expr` is left to `lhs`. But I'm unsure whether it should raise a TypeError when `expr` is not a Module. My personal expectation is that `lhs` is evalu...
-
02:30 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
- There are specs that cover this, so at least it is how Ruby implementors understand that it is intended to be, and it's been this way for a decade or more.
https://github.com/ruby/spec/blob/ff678eb339f16fc5424b25f2e2c82c59c14583be/lan... -
02:28 PM Bug #15928: Constant declaration does not conform to JIS 3017:2013
- s/lhs/rhs/
-
02:25 PM Bug #15928 (Closed): Constant declaration does not conform to JIS 3017:2013
- The order of evaluation in constant declaration does not conform to JIS 3017:2013 11.4.2.2.3.
# Problem
Suppose that we are evaluating the following program.
```ruby
expr::C = rhs
```
The standard seems to be requiring the ... - 02:01 PM Revision d4929f51 (git): * expand tabs.
-
02:00 PM Revision 1ff26dc4 (git): Revert "Make constant assignments more conforming to JIS X 3017:2013 11.4.2.2.3"
- This reverts commit 44caca11cfa6bea01a1ef738846183f1a56d5658.
The change caused a build failure.
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/2102153 - 01:48 PM Revision 11f8c891 (git): * expand tabs.
-
01:48 PM Bug #15924: Ripper::Lexer RuntimeError - Ripper FATAL - master/trunk
- @nobu
Thanks. Actually, YARD doesn't use the Lexer, but I switched to using it a long time ago, and all the repos shown at https://msp-greg.github.io/ are created using it. Conversely, Lexer is subclassed from Ripper. So what's usi... -
10:18 AM Bug #15924: Ripper::Lexer RuntimeError - Ripper FATAL - master/trunk
- It is an example of syntax error, cannot be fallen back?
YARD itself just warns it but succeeds.
```
$ echo $'<<\"EOS\n\"\nEOS' > yardtest.rb
$ ~/.gem/ruby/2.7.0/bin/yard doc yardtest.rb
[warn]: Syntax error in `yardtest.rb`:(1... -
01:43 PM Revision 44caca11 (git): Make constant assignments more conforming to JIS X 3017:2013 11.4.2.2.3
- compile.c (NODE_CDECL): Evaluate the module before the value
test/ruby/test_const.rb (test_evaluation_order): added a test case -
01:27 PM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- Whether it's YAML or another data format like JSON, I've found it useful on occasion to treat `sprintf()` like a mini templating from a runtime generated Hash like ashmaroli mentioned. Sometimes ERB seems like overkill in quick scripts o...
-
11:41 AM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- ashmaroli (Ashwin Maroli) wrote:
> One use-case would be where the Data used by `sprintf` is generated at runtime:
> ...
I do not think that is the duty of string format.
If the YAML file is written by a Ruby program, then you shoul... -
06:46 AM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- > Can you give us some actual use case(s) where such rewriting would not be possible, or very tedious?
One use-case would be where the Data used by `sprintf` is generated at runtime:
```ruby
require 'yaml'
# contents of 'path/to/... -
03:04 AM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- I agree with @sawa that there's a difference between gsub (where strings are replaced by strings) and sprintf, where it's interpolating something very close to variables.
A use case such as
```
"foo = %{foo}" % { 'foo' => 'bar' }
`... -
01:26 PM Bug #15807: Range#minmax is slow and never returns for endless ranges
- Thinking about this a bit more generally, I'm wondering whether `Enumerable#minmax` should actually use `rb_funcall` to get `min` and `max`.
This would fix the problem described in this issue.
But perhaps more importantly, it elimi... -
01:11 PM Feature #15923: New independent string without memcpy
- Thank you Nobu, I thought that might be the case but was unaware as I'm not familiar with the GC subsystem. Also I think shyouhei was saying the same thing, I was just too dense to understand the specifics of what he was saying :)
Hav... -
06:32 AM Feature #15923: New independent string without memcpy
- `ruby_xfree` != `free`.
Using the former on malloc'ed buffer can cause a crash. -
10:45 AM Feature #15920: Check frozen state of ENV
- jeremyevans0 (Jeremy Evans) wrote:
> Eregon (Benoit Daloze) wrote:
> ...
I would call that entirely unsupported, and if there are ways to detect this, we should probably raise an exception.
Basically, I believe it's undefined behavior... -
10:35 AM Feature #15920: Check frozen state of ENV
- jeremyevans0 (Jeremy Evans) wrote:
> * Disallow modifying `ENV` after `ENV.freeze` (my original patch).
I don't object this behavior itself, just don't consider the current behavior a bug, that is I don't think this should be backpor... -
05:46 AM Revision 2fb1564c (git): Implement line_no correctly
-
03:21 AM Bug #15801: [BACKPORT] ChangeLogs of 2.5 and 2.6 begin before the 2.4 release
- ruby_2_6 r67711 merged revision(s) af1e487e9bb763b939dc6704c9a343c9eafa1637,6f8ac2cb28f99a4b2588c59ec44eff6ed38c4d3b.
-
03:20 AM Revision accd7f69 (git): merge revision(s) af1e487e9bb763b939dc6704c9a343c9eafa1637,6f8ac2cb28f99a4b2588c59ec44eff6ed38c4d3b: [Backport #15801]
- Updated marked commits for ChangeLog
Include the beginning commit in ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
02:59 AM Revision 17e6536f (git): tool/redmine-backporter.rb: Change redmine git revisions URL path.
- 02:46 AM Revision 72cc5cf0 (git): * 2019-06-16
-
02:39 AM Revision ee7999bb (git): tool/redmine-backporter.rb: Add parens to fix condition for svn revision search.
-
12:55 AM Feature #15921: R-assign (rightward-assignment) operator
- If it's not clear, previous statement is evaluated like:
```ruby
(Users.where(active: true) => active_users).where(type: "admin") => admin_users
``` -
12:55 AM Feature #15921: R-assign (rightward-assignment) operator
- There are two areas where I think this is a great addition:
```ruby
x = if foo
bar
else
baz
end
if foo
bar
else
baz
end => x
```
I prefer the latter, because it avoids messing with the indentation/readability of th...
06/15/2019
-
06:08 PM Feature #15927: Allow string keys to be used for String#% and sprintf methods
- > My argument for this feature is that String#gsub() and family works with string keys if given a Hash
That is because they replace substrings, in which case it rather does not make sense to express them as symbols. The argument cann... -
02:28 PM Feature #15927 (Closed): Allow string keys to be used for String#% and sprintf methods
- Right now, in the methods sprintf() and String#%, only symbol keys can be used for named interpolation. For example (from the example documentation):
"foo = %{foo}" % { :foo => 'bar' } #=> "foo = bar"
String keys do not work... -
05:31 PM Feature #15920: Check frozen state of ENV
- Eregon (Benoit Daloze) wrote:
> One potential concern here is that even if `ENV` is frozen, C extensions, or native libraries linked by C extensions, might still call e.g., `setenv()` and effectively modify values returned by `ENV` (and... -
05:01 PM Feature #15920: Check frozen state of ENV
- One potential concern here is that even if `ENV` is frozen, C extensions, or native libraries linked by C extensions, might still call e.g., `setenv()` and effectively modify values returned by `ENV` (and even add new environment variabl...
-
12:07 AM Feature #15920: Check frozen state of ENV
- nobu (Nobuyoshi Nakada) wrote:
> I don't think this behavior a bug.
> ...
I think the current situation of `ENV.freeze` not raising an exception but still allowing mutation is a bug. We have two ways to fix it:
* Disallow modifying... -
03:58 PM Bug #15924: Ripper::Lexer RuntimeError - Ripper FATAL - master/trunk
- Found the issue, below is a repo, which in MinGW master, generates RuntimeError...
```ruby
require 'ripper'
temp = "<<\"EOS\n\" # This has been warned since 2.4\nEOS"
puts '', temp, ''
lexer = Ripper::Lexer.new temp
lexer.l... -
04:54 AM Bug #15924 (Closed): Ripper::Lexer RuntimeError - Ripper FATAL - master/trunk
- YARD based docs systems use Ripper for highlighting both source code and 'code snippets' in comments and rdoc/md files.
Using the build shown, I have an error as shown:
```
lib/ruby/2.7.0/ripper/lexer.rb:101:in `lex'
lib/ruby/2.7... -
01:42 PM Feature #15923: New independent string without memcpy
- I think what puchuu is asking is if he can pass a malloc'd string to a ruby function that will create a new string object that frees the given underlying buffer when the string object is destructed. Having read the code, I didn't come up...
-
01:19 PM Bug #15926 (Closed): Edge case issue with String#uminus
- I was working on issue related to code in `rb_fstring`(https://github.com/ruby/ruby/pull/2233) and saw some weird behavior in the function,
freezing the given string if it's not a "bare" string and it's small enough to be embedded.
T... -
11:10 AM Misc #15925 (Closed): Speed up SortedSet#min, #max, #sum etc.?
- this issue is somewhat similar to https://bugs.ruby-lang.org/issues/15807
current situation, using the example of `SortedSet#min` (without `rbtree`):
- `SortedSet#min` calls `Enumerable#min`
- `Enumerable#min` calls `SortedSet#eac... -
10:38 AM Feature #15897: `it` as a default block parameter
- Kotlin has implemented `it` like this ([docs](https://kotlinlang.org/docs/reference/lambdas.html#it-implicit-name-of-a-single-parameter)).
From purely personal experience, after doing just a little bit of Kotlin, I often feel a tempta... -
09:50 AM Bug #15807: Range#minmax is slow and never returns for endless ranges
- jeremyevans0 (Jeremy Evans) wrote:
> I think this is a bug we should fix, even if it breaks code relying on this bug ("all bug fixes are incompatibilities" :)).
Yes, it is a bit reminiscent of https://xkcd.com/1172/ :)
> ...
Other... -
03:04 AM Revision 5d790549 (git): Revert github/pull/2230, commit miss
-
02:58 AM Revision 6fa4c904 (git): Prefer `enum yytokentype` to int
-
02:25 AM Revision 46527e1b (git): Test for blank lines between leadinig dot method chains
-
02:25 AM Revision b8730f12 (git): Multiline method chain with leading dot works for blank lines
-
02:25 AM Revision 2240de98 (git): Remove blank line I accidentally added
-
02:25 AM Revision 162bfa1c (git): Test comments between multiline method chain
-
02:25 AM Revision cc180e93 (git): Rename LINEND to EMPTYLN
-
02:25 AM Revision 5af5dd46 (git): Omg, it works!
- I'll rename it and squash this commit later,
just wanted to make sure I couldn't lose it
(took a long time to come up with). - 02:09 AM Revision e6aefe2a (git): * 2019-06-15
-
02:06 AM Revision 5dd8fdd3 (git): test/net/imap/test_imap.rb: wait for the server thread to start
- In some slow CI environments, the invocation of a thread seems very
slow. This causes a test failure to attempt to connect a server that
does not start yet.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20... -
01:53 AM Bug #15763: Segmentation fault in timeout.rb / sleep
- A valid workaround until this is fixed in MacOS - if you can get away without ipv6 - is to have your web server like Puma bind to an ipv4 address like `-b 127.0.0.1` or `-b 0.0.0.0` upon boot and then all is :rainbows:.
-
01:00 AM Feature #15919: Offset parameter for `Integer#times`
- I agree with all the commenters that using keyword arguments is crucial (and I prefer `start_at:` (or maybe just `start:`) to `offset:`). I also agree that `Integer#step` seems already good enough. Maybe we could add a line about `Intege...
-
12:56 AM Bug #15199: scanf.rb broken with io from IO.pipe (MinGW or Windows?)
- I've tested on Windows and confirmed this is a bug.
I added a pull request upstream to fix this: https://github.com/ruby/scanf/pull/4
If nobody has objections, I'll merge this in about a week. -
12:18 AM Bug #15200 (Closed): RubyVM::InstructionSequence can not compile to binary from method call with hash in 'if false' expression
-
12:18 AM Bug #15221 (Closed): Segfault in Ruby VM
-
12:15 AM Bug #15246 (Closed): Invalid read (SEGV on indeterminate address) in id_table.c
-
12:11 AM Bug #15308 (Closed): SegFault in GC under Ruby 2.5.3 on OS X
06/14/2019
-
11:59 PM Feature #15923: New independent string without memcpy
- puchuu (Andrew Aladjev) wrote:
> Is it possible to create independent string from source string without memcpy that will be freed automatically?
In C there are several ways to free a memory region, depending how that string was alloc... -
01:51 PM Feature #15923 (Rejected): New independent string without memcpy
- Hello. I've just tried to implement extension for ruby that will provide large binary strings.
I've inspected latest ruby source code and found 2 functions: _rb_str_new_ and _rb_str_new_static_ .
* _rb_str_new_ allocates new memory... -
11:12 PM Feature #15799: pipeline operator
- Matz:
Ruby being a "Lisp-2" means that the pipeline operator couldn't be implemented like a "normal" operator (all of them being translated to methods on Object or etc), but it could be implemented on the parser level, like almost all... -
07:30 PM Feature #15799: pipeline operator
- rogeriochaves (Rogerio Chaves) wrote:
> May I give yet another suggestion? What about :., it would keep the visual effect
> ...
Or \\ maybe. It's much easier to type.
1 + 1 \\ to_s 2 \\ reverse \\ to_i
We can then have |> as an a... -
04:56 PM Feature #15799: pipeline operator
- @cichol Agreed! Here is a working proof of concept for an "operator-less" pipe operator which feels more natural in Ruby: https://github.com/lendinghome/pipe_operator
```ruby
# before
JSON.parse(Net::HTTP.get(URI.parse(url)))
# a... -
01:15 PM Feature #15799: pipeline operator
- Hi,
I want to introduce a way to pipeline method calls in Ruby.
I imagined that the Ruby-styled pipelined calls should be like:
```ruby
1.pipe do
call 1 + _ # => after this line, _ becomes 2
call _ * 3 # => after this line,... -
11:03 AM Feature #15799: pipeline operator
May I give yet another suggestion? What about :., it would keep the visual effect
```ruby
1 + 1
:. to_s 2
:. reverse
:. to_i
```-
10:30 AM Feature #15799: pipeline operator
- From my perspective, the |> operator exists because in functional programming languages you have these increasingly nested function calls which have to end with a stack of parentheses that are hard to read. In Haskell I very frequently u...
-
08:27 AM Feature #15799: pipeline operator
- I wonder if it would be possible to get method objects somehow. `.:` was capable of doing this off of objects, but doing it in the main namespace is not easy.
If pipeline operators in an Elixir style were considered, it may be able to... -
07:45 AM Feature #15799: pipeline operator
- Unlike JavaScript and Python (Lisp-1 like languages), Ruby is a Lisp-2 like language, in which methods and variable have separated namespaces. In Lisp-1 like languages, `f1 = function; f1()` calls `function` (single namespace).
In a L... -
06:15 AM Feature #15799: pipeline operator
- That's a very fair point @jeremyevans0, it would introduce two lookup chains even under the most ideal of circumstances. Perhaps if `&` were slightly extended, one could do this:
```ruby
def double(n) n * 2 end
increment = -> n { ... -
05:42 AM Feature #15799: pipeline operator
- I think one big issue here is simply the choice of symbols for this thing. If it were any other symbols, I suspect a lot of people would not have reacted so emotionally.
To most Rubyists who know it, `|>` has a distinctive meaning. It... -
03:18 AM Feature #15799: pipeline operator
- baweaver (Brandon Weaver) wrote:
> But in summary, I believe this feature could be substantially more expressive and powerful if it adjusted its lookup chain from directly calling on an object to searching the local scope for procs and... -
03:00 AM Feature #15799: pipeline operator
- @inopinatus We are working on the right side assignment operator. Combine pipelines with it.
Matz.
-
02:51 AM Feature #15799: pipeline operator
- I have written on my opinions here: https://dev.to/baweaver/ruby-2-7-the-pipeline-operator-1b2d
But in summary, I believe this feature could be substantially more expressive and powerful if it adjusted its lookup chain from directly ... -
02:01 AM Feature #15799: pipeline operator
- Please consider adjusting the precedence of the pipeline operator to be above that of assignment. I was surprised by this outcome:
``` ruby
result = 3 |> pow(2) #=> 9
result #=> 3 (!?!?!)
```
-
12:12 AM Feature #15799: pipeline operator
- Responses to this change:
- Twitter: https://twitter.com/a_matsuda/status/1139110957450375168
- Reddit: https://www.reddit.com/r/ruby/comments/c059d2/pipeline_operator_in_ruby/
- Github (mentioned above): https://github.com/ruby/rub... -
09:45 PM Feature #15903: Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path
- Thanks for discussing the issue at the meeting.
I think having singleton-only methods on `Kernel` would be OK, and probably most of us agree having the instance method is not warranted for a rarely-used method.
`Kernel` makes sense t... -
02:51 AM Feature #15903: Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path
- This ticket was discussed at yesterday dev meeting. Currently there is no singleton method to `Kernel`, so some people were reluctant. Nobu counterproposed `$LOAD_PATH` as above, and matz said he waits for eregon's response to the coun...
-
09:28 PM Feature #15897: `it` as a default block parameter
- shugo (Shugo Maeda) wrote:
> > I think we should never purposefully introduce something ugly in the language.
> ...
That's not what I meant. I'd rather not have something ugly in the language at all.
But I think we can make it not ugl... -
02:54 AM Feature #15897: `it` as a default block parameter
- Eregon (Benoit Daloze) wrote:
> shugo (Shugo Maeda) wrote:
> ...
So let's reject both proposals.
> Preventing overuse is I think best done by limiting to a single argument (as argued in #15723).
I guess `it` will be overused when... -
08:58 PM Bug #13220: Enhance support of Unicode strings manipulation
- Most of these test failures are caused by Ruby operating on code points, not grapheme clusters. There are more and more characters that are only expressed by several code points, and they are not limited to obscure cases, such as "q̈". F...
-
02:53 PM Feature #15899: String#before and String#after
- sawa is right. Just use `partition` and `rpartition`.
-
07:30 AM Feature #15899: String#before and String#after
- How about `first` and `last`?
```ruby
'hello world'.first(2)
=> 'he'
'hello world'.last(2)
=> 'ld'
'hello world'.first
=> 'h'
'hello world'.last
=> 'd'
'hello world'.first(1, ' ')
=> 'hello'
'hello world'.last(1, ' ')
... -
12:27 PM Feature #15921: R-assign (rightward-assignment) operator
- This has lower precedence, so the latter.
-
10:49 AM Feature #15921: R-assign (rightward-assignment) operator
- where does the rightward assign works and where it is blocked? `y => x` might be treated as Hash Parameter
like `m y => x` is this `m(y) => x` or still `m({y => x})` -
03:08 AM Feature #15921 (Closed): R-assign (rightward-assignment) operator
- From https://bugs.ruby-lang.org/issues/15799#change-78465, proposal of the rightward-assignment operator by `=>`.
```
$ ./ruby -v -e '(1..).lazy.map {|x| x*2} => x' -e 'p x.first(10)'
ruby 2.7.0dev (2019-06-12T06:32:32Z feature/rass... -
12:25 PM Feature #15920: Check frozen state of ENV
- I don't think this behavior a bug.
`ENV` is an interface to the system environment variables, so freezing it doesn't affect the underlying system.
And be careful that an object can never be unfrozen anymore, once it got frozen.
For w... -
06:35 AM Feature #15920: Check frozen state of ENV
- Agree - looks like a bug to me as well.
-
02:27 AM Feature #15920: Check frozen state of ENV
- I didn't know `assert_separately`, thank you!
-
12:16 PM Feature #14912: Introduce pattern matching syntax
- I've intentionally focused on use-cases because: I wanted to make clear why Ruby should to support this; and I've included a possible solution only to make it more clear, since I think Kazuki or somebody else who also spend significant t...
-
09:17 AM Revision d365fd5a (git): An operator is not allowed just after `|>`
- https://twitter.com/yukihiro_matz/status/1139454774640726019
-
08:30 AM Revision d780c366 (git): Pipeline operator is experimental [ci skip]
-
06:31 AM Revision aa32465a (git): irb.rb: [DOC] the default prompt includes :PROMPT_N [ci skip]
-
03:40 AM Feature #15922 (Open): Enumerable#partition(pattern)
- * `any?` `all?` `one?` `none?` already can take pattern argument. ref: https://bugs.ruby-lang.org/issues/11286
* `select` `reject` is proposed to take pattern argument. ref: https://bugs.ruby-lang.org/issues/14197
I would like to use... -
01:02 AM Bug #15857: <=> の右辺が <=> を実装していない場合の振る舞い
- > > @jeremyevans0 Thank you for your comment. About Complex, I agree with most of v2 patch, but I have some comments.
> ...
I don't have a strong opinion, too.
> > About other than Complex, <=> of some classes, such as String and Tim...
06/13/2019
-
11:46 PM Revision 50bb8b60 (git): Use Exception#full_message for traceback
-
11:45 PM Revision 9402d019 (git): Remove debug print
-
11:45 PM Revision d0e55641 (git): Set allow_escape_code for prompt
-
11:26 PM Revision f80771f0 (git): Use Reline.prompt_proc in IRB
- 10:46 PM Revision 3757e492 (git): * 2019-06-14
-
10:42 PM Revision 64310b25 (git): Add Reline.prompt_proc
-
10:03 PM Feature #15901: Enumerator::Lazy#eager
- zverok (Victor Shepelev) wrote:
> > How about this style?
> ...
I don't see how the suggestion defies anything, changes the current `lazy` method (without block) and or "requires" anything. It simply extends it with a block form that w... -
09:01 AM Feature #15901: Enumerator::Lazy#eager
- I'd rather keep this issue simple. We can talk about it later in another issue.
-
07:14 AM Feature #15901: Enumerator::Lazy#eager
- > How about this style?
```ruby
[0, 1, 2].lazy {|e| e.map {|n| n + 1 }.map {|n| n.to_s } }
#=> an Enumerator containing "1", "2", and "3"
```
I believe that it defies the whole idea of lazy enumerators. Instead of chaining lazin... -
07:05 AM Feature #15901: Enumerator::Lazy#eager
- mame (Yusuke Endoh) wrote:
> How about this style?
> ...
Is it like extending lazy() as below?
```ruby
def lazy(&block)
if block
return block.call(lazy).eager
end
Enumerator::Lazy.new(self)
end
```
It may be an... -
08:44 PM Bug #15916: Memory leak in Regexp literal interpolation
- I can confirm this is still an issue on the master branch, and it appears to be leaking ~178 bytes/regexp. It occurs both with and without the case insensitive modifier. I'm think it must be a difference between `rb_reg_initialize_m` a...
-
07:49 PM Feature #15920: Check frozen state of ENV
- I think this is a bug and we should fix it. I took a slightly differently approach in the attached patch, using `rb_check_frozen` directly instead of introducing a new function, and combining all of the tests for behavior when frozen in...
-
10:56 AM Feature #15920 (Closed): Check frozen state of ENV
- github: https://github.com/ruby/ruby/pull/2234
Is this an intentional behavior?
``` ruby
ENV.freeze
ENV.clear #=> No exception happen
```
raising FronzenError sounds reasonable to me
-
07:30 PM Feature #15919: Offset parameter for `Integer#times`
- `Numeric#step` does something similar:
``` ruby
> 3.step(to: 10, by: 2) { |a| p a }
3
5
7
9
```
-
07:06 PM Feature #15919: Offset parameter for `Integer#times`
- It took me a moment to understand the proposal (I am not sure why I am having a hard time understanding
proposals lately; but in my defence, I am getting older, and it is currently very hot in central europe -
hope you folks have a bet... -
12:22 PM Feature #15919: Offset parameter for `Integer#times`
- I like the idea. It could also be a Hash and appart from `offset`, we could have `step` as well:
```
5.times(offset: 3, step: 2) {|i| p i}
# >> 3
# >> 5
# >> 7
# >> 9
# >> 11
``` -
09:37 AM Feature #15919: Offset parameter for `Integer#times`
- Could be confusing. "5 times 3" is 15.
-
09:18 AM Feature #15919 (Rejected): Offset parameter for `Integer#times`
- I request an optional argument on `Integer#times` to set the offset at start, just like `Enumerator#with_index`.
```ruby
5.times(3){|i| p i}
# >> 3
# >> 4
# >> 5
# >> 6
# >> 7
```
I think there are plenty of use cases, espec... -
06:22 PM Bug #15442 (Closed): irb behaves strange in Ruby 2.6
-
12:27 PM Bug #15442: irb behaves strange in Ruby 2.6
- this can be closed
-
06:08 PM Bug #15436 (Closed): Tests failing in `make check`
- The openssl issue was fixed by commit:b8af33e63bd286308e5e1b20c182ec50e0f194de
The second issue was fixed earlier by installing FFI. -
12:27 PM Bug #15436: Tests failing in `make check`
- this can be closed
-
02:09 PM Feature #15799: pipeline operator
- > a topic of "ruby committers vs the world" in RubyKaigi 2019.
Link to video of discussion Nobu referenced: https://youtu.be/5eAXAUTtNYU?t=1944
I turned on Auto-Translate to English which marginally helped add a small bit of contex... -
01:23 PM Feature #15799: pipeline operator
- "I don't have to use it" doesn't work in the real world where you have projects with multiple contributors, dependencies and multi-year history.
This new "feature" does not add *anything* except a new way to write a method call, and w... -
11:43 AM Feature #15799: pipeline operator
- I assume matz approved it. I don't think it is good to want to reason
against a change since the decision making is not a community-decision
in general.
As for the feature itself - I do not like the syntax, but as is the case
with ... -
10:00 AM Feature #15799: pipeline operator
- Why was this accepted? I cannot see anyone really supporting this idea in this issue's comments.
As everyone said, it hurts readability, looks like Haskell, and there seems to be really no need for a different syntax for methods calls.
... -
09:48 AM Feature #15799 (Closed): pipeline operator
- Applied in changeset commit:git|f169043d81524b5b529f2c1e9c35437ba5bc3a7a.
----------
Add pipeline operator [Feature #15799] -
02:04 PM Revision 56d59519 (git): test/webrick/test_ssl_server.rb: Use EnvUtil.timeout for timeout scale factor
- https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190613T091708Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190612T011708Z.fail.html.gz
https://rubyci.org/logs/rub... -
01:44 PM Revision e75c2781 (git): test/lib/test/unit/assertions.rb (assert_cpu_usage_low): tweak the wait
- It still fails randomly.
https://rubyci.org/logs/rubyci.s3.amazonaws.com/amazon2/ruby-master/log/20190613T093003Z.fail.html.gz
https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-master/log/20190613T051547Z.fail.h... -
01:19 PM Revision aa721183 (git): Continue to the next line beginning with a pipeline
-
01:03 PM Revision 043f010c (git): parse.y: moved pipeline to expr
- To allow arguments without parentheses.
-
12:24 PM Bug #15793: Please backport 7b7043e5da8589e01b94575d4ed647e909e5c875
- Backported into ruby_2_6 at r67710.
-
12:23 PM Revision f4fe2a76 (git): merge revision(s) 7b7043e5da8589e01b94575d4ed647e909e5c875: [Backport #15793]
- eliminate use of freed memory
rb_io_fptr_finalize_internal frees the memory region.
=================================================================
==85264==ERROR: AddressSanitizer: heap-use-after-free on addr... -
09:44 AM Revision f169043d (git): Add pipeline operator [Feature #15799]
-
09:33 AM Feature #15903: Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path
- nobu (Nobuyoshi Nakada) wrote:
> How about `$LOAD_PATH.resolve_feature_path`?
As a singleton method, and because `$LOAD_PATH` cannot be re-assigned?
It's a fun idea, although I suspect this will be very hard to find and document pro... -
08:24 AM Feature #15903: Move RubyVM.resolve_feature_path to Kernel.resolve_feature_path
- How about `$LOAD_PATH.resolve_feature_path`?
-
09:16 AM Bug #15210 (Closed): UTF-8 BOM should be removed from String in internal representation
- Applied in changeset commit:git|e717d6faa8463c70407e6aaf116c6b6181f30be6.
----------
IO#set_encoding_by_bom
* io.c (rb_io_set_encoding_by_bom): IO#set_encoding_by_bom to set
the encoding by BOM if exists. [Bug #15210] -
08:36 AM Bug #15210: UTF-8 BOM should be removed from String in internal representation
- Renamed and an exception at unexpected condition.
https://github.com/nobu/ruby/pull/new/feature/15210-set_encoding_by_bom -
07:24 AM Bug #15210: UTF-8 BOM should be removed from String in internal representation
- https://github.com/nobu/ruby/pull/new/feature/15210-detect_bom
-
09:13 AM Revision e717d6fa (git): IO#set_encoding_by_bom
- * io.c (rb_io_set_encoding_by_bom): IO#set_encoding_by_bom to set
the encoding by BOM if exists. [Bug #15210] - 09:07 AM Revision bdc8b378 (git): * expand tabs.
-
09:05 AM Revision 02b1a853 (git): remove 2 redundant calls to rb_str_dup
- Because `rb_class_path` calls `rb_str_dup` already.
Closes: https://github.com/ruby/ruby/pull/2232 -
08:08 AM Feature #15563: #dig that throws an exception if a key doesn't exist
- I thought adding an optional block to dig could be an idea.
```ruby
obj.dig(*keys) { |dug_keys, rest_keys|
# raise yourself or return something
}
```
But the costs required for extending the dig method as such in Array or Has... -
07:42 AM Revision 69509df2 (git): squeeze space [ci skip]
-
06:41 AM Feature #15725: Proposal: Add Array#reverse_sort, #revert_sort!, #reverse_sort_by, and #reverse_sort_by!
- Clarified that .reverse! can/should be used for reverse order with commit 2a26c1ea24..7f79a86d8b.
-
05:54 AM Feature #15725 (Rejected): Proposal: Add Array#reverse_sort, #revert_sort!, #reverse_sort_by, and #reverse_sort_by!
- Those methods do not make me feel 'spark joy'. If you really care about the performance, use `reverse!` after `sort!`.
Matz. -
06:30 AM Revision 7f79a86d (git): add comments to mention sort.reverse!
- For array.c (Array#sort) and enum.c (Enumerable#sort_by),
add comments mentioning that sort.reverse! / sort_by { ... }.reverse!
can/should be used to reverse the result. [ci skip] -
06:12 AM Feature #15836 (Rejected): [Proposal] Make Module#name and Symbol#to_s return their internal fstrings
- The compatibility breakage from changing those methods (especially `Symbol#to_s`) is too big. Sorry.
Maybe we should work on `HashWithIndifferentAccess` to improve (memory) performance.
Matz. -
06:05 AM Feature #15836: [Proposal] Make Module#name and Symbol#to_s return their internal fstrings
- Isn't one main purpose of converting a Symbol to a String that you want to change the symbol string? This proposal would make that use case more tedious.
-
05:59 AM Feature #15777: autoload?(cname, inherit=true)
- Changing the signature of `rb_autoload_p` could break API compatibility.
I think we'll need another function for it.
Maybe `rb_autoload_at_p` like as `rb_const_defined_at`? -
05:57 AM Bug #15733 (Rejected): Inconsistent __FILE__ and Kernel#__dir__
- `__FILE__` and `__LINE__` are inherited from C preprocessor. Others aren't. I am not going to pursue consistency here.
Matz. -
05:44 AM Feature #14145: Proposal: Better Method#inspect
- ko1 (Koichi Sasada) wrote:
> ```patch
> ...
You can use `rb_str_catf`. -
05:41 AM Feature #14111: ArgumentErrorが発生した時メソッドのプロトタイプをメッセージに含む
- Currently, some methods (especially C defined methods) lack method parameter information to provide this kind of description.
We are working on improving this region, so I put this proposal pending for the time being.
Matz. -
05:00 AM Bug #15826: Haiku LIBC_SO and LIBM_SO support for test/fiddle/helper.rb
- Off topic a little, I think this code is wrong.
```ruby
case [0].pack('L!').size
when 4
# 32-bit ruby
when 8
# 64-bit ruby
end
```
This selects the platform by the size of `long`, but it may differ from the a... -
03:16 AM Bug #15826 (Third Party's Issue): Haiku LIBC_SO and LIBM_SO support for test/fiddle/helper.rb
-
03:14 AM Bug #15826: Haiku LIBC_SO and LIBM_SO support for test/fiddle/helper.rb
- Could you please make a pull-request for [ruby/fiddle repository](https://github.com/ruby/fiddle/pulls)?
-
03:16 AM Bug #15913: Segmentation fault in using RubyVM::InstructionSequence#to_binary. - I didn't know this problem already fixed. Thanks.
-
01:45 AM Bug #15432: Float の NaN のみを含む配列比較のテスト
- I agree that keeping this spec does not make sense. If nobody objects within the next week, I will delete the spec.
06/12/2019
-
10:54 PM Bug #15467 (Closed): Creating a class with a Cyrillic first symbol in the name leads to a SyntaxError in IRB
- This issue was fixed before 2.7.0-preview1:
```
$ irb27
irb(main):001:0> class Класс
irb(main):001:0> end
=> nil
irb(main):002:0> class ласс
irb(main):002:0> end
Traceback (most recent call last):
3: from /usr/local/bi... -
10:44 PM Bug #15572 (Closed): `RubyVM::InstructionSequence` doesn't work with `extend`.
- As wanabe pointed out, this isn't a bug. `load_iseq` is `undef` in the singleton class, which occurs before extended modules during method lookup. `prepend` on the singleton class works because prepended modules on the singleton class ...
-
10:18 PM Feature #15881: Optimize deconstruct in pattern matching
- marcandre (Marc-Andre Lafortune) wrote:
> mame (Yusuke Endoh) wrote:
> ...
ktsj and I prefer simpleness and robustness to performance when we consider the design of Ruby language. In Ruby, optimization is not primary; it is good as lo... -
01:23 PM Feature #15881: Optimize deconstruct in pattern matching
- mame (Yusuke Endoh) wrote:
> I talked with ktsj, the author of pattern matching. He had actually considered caching the result of deconstruct, but we found it difficult because of some reasons.
> ...
Is there a valid use case for this... -
12:56 PM Feature #15881: Optimize deconstruct in pattern matching
- I talked with ktsj, the author of pattern matching. He had actually considered caching the result of deconstruct, but we found it difficult because of some reasons.
* If destructive operation is applied to the object being matched (t... -
08:44 PM Bug #15913 (Closed): Segmentation fault in using RubyVM::InstructionSequence#to_binary.
- I've tested and confirmed this is fixed by commit:484cc6b3bc828a0bb62aebefd7fdc2c86cab4f57. Please update to ruby 2.5.5.
-
03:24 PM Bug #15913: Segmentation fault in using RubyVM::InstructionSequence#to_binary.
- Maybe [Bug #14553]?
-
09:51 AM Bug #15913: Segmentation fault in using RubyVM::InstructionSequence#to_binary. - ### This problem occured the crash with just using `if false` statement pattern.
```ruby
# good
# do not use `if false` statement
RubyVM::InstructionSequence.compile('if true; Hash.try_convert({id: 1}); end').to_binary
RubyV... -
08:52 AM Bug #15913: Segmentation fault in using RubyVM::InstructionSequence#to_binary. - ## Crash log
```
$ ruby -e "RubyVM::InstructionSequence.compile('{}.each {|this| if false; Hash.try_convert({id: 1}); end }').to_binary"
-e:1: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.5.1p57 (2018-03-29 revision 630... -
08:41 AM Bug #15913 (Closed): Segmentation fault in using RubyVM::InstructionSequence#to_binary. - Occur Segmentation fault when the ruby code is class methods with hash argument in if false statement in iteration methods into RubyVM::InstructionSequence.compile.
```ruby
# good
RubyVM::InstructionSequence.compile('puts "Hello, Wo... -
03:41 PM Revision 2a26c1ea (git): Clarify the Ruby version support status in IRB more
- 03:32 PM Revision 8d84e119 (git): * 2019-06-13
-
03:32 PM Revision 18080290 (git): make sync-default-gems GEM=irb
- Upgrade IRB to https://github.com/ruby/irb/commit/41ea43a4a732e094acfa1b0fc1473fdcda9e6227
Mostly backport changes. -
02:58 PM Feature #15918: Pattern matching for Set
- Sets are supposed to be unordered (any ordering is an implementation detail). If `Set[1, 2, 3]` matches in your example, so should `Set[3, 2, 1]`, since `Set[1, 2, 3] == Set[3, 2, 1]`. We could attempt to sort the elements of the set b...
-
02:20 PM Feature #15918: Pattern matching for Set
- Eregon (Benoit Daloze) wrote:
> Did you mean `in Set[1, 2, 3]` ?
I didn't, but it should match too; it's the same as my example but with the added constraint that the object should be a descendant a `Set`. Note that `in Set[1, 2, 3]`... -
02:02 PM Feature #15918: Pattern matching for Set
- Did you mean `in Set[1, 2, 3]` ?
-
01:44 PM Feature #15918 (Assigned): Pattern matching for Set
- Currently, `Set` does not respond to `deconstruct`. Shouldn't we implement it using `to_a`?
```
require 'set'
case Set[1, 2, 3]
in [1, 2, 3]
p "match"
else
p "no match"
end
# => "no match", should be "match"
```
-
01:41 PM Feature #15917 (Closed): Pattern matching for Struct
- `Struct`s respond to `deconstruct`, not to `deconstruct_keys`. Shouldn't we also implement it?
```
A = Struct.new(:foo, :bar)
case A.new(1, 2)
in foo: 1, **rest
p "match"
else
p "no match"
end
# => "no match", should be ... -
01:35 PM Feature #15799: pipeline operator
- @nobu Awesome. I don't know what other's would think, but from my perspective, the feature now becomes consistent with the language and have (however small) chances to be appreciated by the public.
-
06:36 AM Feature #15799: pipeline operator
- zverok (Victor Shepelev) wrote:
> But **if** "...and now put it into a variable" is necessary, why not reuse `=>`? It is invalid syntax currently (without braces), and would be consistent with `rescue Foo => x` and the same use in a new... -
01:33 PM Bug #15916: Memory leak in Regexp literal interpolation
- Simplified the test case.
-
01:23 PM Bug #15916 (Closed): Memory leak in Regexp literal interpolation
- When interpolating a string inside a Regexp literal, if the string contains a multibyte character loaded from a file (not sure if this covers all the cases, but this is what triggers it for me), Ruby leaks memory.
The code below repro... -
01:20 PM Misc #15874: DevelopersMeeting20190613Japan
- * [Feature #15563] #dig that throws an exception if an key doesn't exist
* Previously [Matz said](https://bugs.ruby-lang.org/issues/15563#note-4) `#dig!` is a bad name and asked a real-world use case.
* How about `#deep_fetch` for ... -
06:22 AM Misc #15874: DevelopersMeeting20190613Japan
- * [Feature #15897] `it` as a default block parameter
* A keyword `it` has never been seriously considered because adding a new keyword brings a big incompatibility.
* However, I'd like to show that it is possible to add `it` as a k... -
12:13 PM Feature #15915: `@1` cannot be achieved in meta-programming
- > What is the use case?
OP says a debugger. The motivation looks reasonable to me.
> ...
I think it would be technically possible.
If this ticket is accepted, `Binding#local_variables` should include numbered parameters. It mi... -
09:55 AM Feature #15915: `@1` cannot be achieved in meta-programming
- What is the use case? And how do you want it to be made possible?
-
08:55 AM Feature #15915 (Closed): `@1` cannot be achieved in meta-programming
- I cannot think of any way to get `@1` in meta-programming, so it is hard to inspect it in a debugger.
~~~
% ruby -e 'proc{@1;binding.local_variable_get("@1")}.call(1)'
Traceback (most recent call last):
2: from -e:1:in `<main>'
... -
11:44 AM Bug #14451 (Third Party's Issue): HTTP responses with Content-Length: 0 cause a failure
-
08:47 AM Bug #14451: HTTP responses with Content-Length: 0 cause a failure
- Hello, thanks for report. REST Client is actually not part of Ruby, feel free to move the report there: https://github.com/rest-client/rest-client
-
09:37 AM Feature #15914: mkmf without libruby
- It took me a moment to understand what you mean; I first misread it as "not
depending on mkmf".
I guess the intention for your change is to have more more flexibility; if
this is the case then personally I think this may be a useful... -
08:54 AM Feature #15914 (Open): mkmf without libruby
- It would be nice to be able to use `mkmf` without `libruby`.
Motivating use-case:
Many gems provide Ruby bindings to C ABI via [Ruby FFI](https://github.com/ffi/ffi) instead of libruby.
This is because Ruby FFI is easier to use, is ... -
08:22 AM Feature #15901: Enumerator::Lazy#eager
- +1 for the feature. I'm not a fan for the notation `.lazy. ... .eager`, though.
How about this style?
```
[0, 1, 2].lazy {|e| e.map {|n| n + 1 }.map {|n| n.to_s } }
#=> an Enumerator containing "1", "2", and "3"
```
-
06:30 AM Revision 88411d35 (git): Another incomplete string case
-
06:25 AM Revision 9593e76a (git): Ripper::Lexer: fallback parse error token to the previous one
-
02:00 AM Revision 8354cfd0 (git): Treat "begin rescue end" correctly
-
12:07 AM Bug #15664: File.executable returns incorrect results in Windows 10
- I agree on the documentation fix, but I guess that `Gem.bin_path` should return the proper stub file path in this case.
06/11/2019
-
10:54 PM Bug #15360 (Closed): "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
- Fix committed at commit:c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf
-
10:52 PM Bug #15508 (Closed): Mutex recursive lock error when combined with Thread#raise
- Fix committed at commit:c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf
-
10:51 PM Bug #15645 (Closed): It is possible to escape `Mutex#synchronize` without releasing the mutex
- Fix committed at commit:c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf
-
08:27 PM Bug #15645: It is possible to escape `Mutex#synchronize` without releasing the mutex
- Eregon (Benoit Daloze) wrote:
> @jeremyevans0 The patch looks wrong, `rb_mutex_lock` should be changed, not `rb_mutex_unlock`.
Correct, apologies for that. It turns out there is a pull request for this that should may the issue (htt... -
08:23 PM Bug #15645: It is possible to escape `Mutex#synchronize` without releasing the mutex
- @jeremyevans0 The patch looks wrong, `rb_mutex_lock` should be changed, not `rb_mutex_unlock`.
-
07:40 PM Bug #15645: It is possible to escape `Mutex#synchronize` without releasing the mutex
- lexi.lambda (Alexis King) wrote:
> Therefore, the solution seems simple: **instead of using `rb_mutex_lock` inside of `rb_mutex_synchronize`, use `mutex_lock_uninterruptible`, which sets `interruptible_p` to `FALSE` and avoids the issue... -
10:44 PM Revision c1d78a7f (git): do_mutex_lock: release mutex before checking for interrupts (fixes issue 15360)
-
08:21 PM Bug #15533 (Third Party's Issue): Segmentation fault: mysql2 client
- This appears to be an issue in the mysql2 library, probably the same issue as https://github.com/brianmario/mysql2/issues/1029, which is a null pointer dereference at the same line as this error.
-
08:05 PM Bug #15596 (Rejected): Kernel.warn without arguments should do the same as Kernel.warn(nil)
- As nobu stated, the current behavior is expected in regards to not printing a newline if no arguments are given, and the documentation is accurate for the current behavior. It states `converts each of the messages to strings, appends a ...
-
07:07 PM Bug #15664: File.executable returns incorrect results in Windows 10
- Unlike Unix, Windows doesn't support execute permissions separately. If the path is a regular file, Ruby currently uses file extensions to determine if a file is executable, and only considers the following extensions as executable: `.ba...
-
05:53 PM Bug #15671 (Third Party's Issue): Segfault
- This doesn't appear to be a ruby or ffi issue. The segfault occurs `multi_cleanup`, which is a libcurl method wrapped by ethon (https://github.com/typhoeus/ethon/blob/de60a72552a1ae392705617a45477d93f0f51293/lib/ethon/curls/functions.rb...
-
05:45 PM Misc #15874: DevelopersMeeting20190613Japan
- * [Feature #15797] Use realpath(3) instead of custom realpath implementation if available (jeremyevans0)
* Is this OK to commit? It may cause regressions on less common Unix not tested by Travis (e.g. FreeBSD, NetBSD, AIX, Solaris), t... -
05:18 PM Bug #15857: <=> の右辺が <=> を実装していない場合の振る舞い
- shuujii (Shuji KOBAYASHI) wrote:
> @jeremyevans0 Thank you for your comment. About `Complex`, I agree with most of v2 patch, but I have some comments.
> ...
I don't think so, but I don't have a strong opinion. If you would like those ... -
02:09 PM Bug #15857: <=> の右辺が <=> を実装していない場合の振る舞い
- @jeremyevans0 Thank you for your comment. About `Complex`, I agree with most of v2 patch, but I have some comments.
- Should methods from `Comparable` that are currently disabled be enabled?
- `rb_undef_method(rb_cComplex, "<=>")` is... -
04:45 PM Bug #15720 (Closed): SystemStackError when referencing a refinement in a module that isn't used
- Applied in changeset commit:git|5e018214e7435030727a97ac49db038d96438e74.
----------
Fix SystemStackError when calling a method in an unused refinement
Fixes [Bug #15720] -
09:03 AM Bug #15720: SystemStackError when referencing a refinement in a module that isn't used
- Seems fine.
Just rename `test_refining_module_repeatedly` which redefines an existing method. -
04:43 PM Revision 5e018214 (git): Fix SystemStackError when calling a method in an unused refinement
- Fixes [Bug #15720]
- 04:16 PM Revision 4f9e7c95 (git): * 2019-06-12
- 04:16 PM Revision 23e3c170 (git): * expand tabs.
-
04:16 PM Revision 6db2d6d8 (git): Add compaction support for more types.
- This commit adds compaction support for:
* Fibers
* Continuations
* Autoload Constants -
02:55 PM Bug #15490: socket.rb - recurring segmentation faults
- I have been experiencing this issue as well, but only on a computer running OSX 10.14.5. I can't seem to recreate this on linux using Fedora 29 or Ubuntu 18.04.
Switching the OSX over to 127.0.0.1 instead of localhost seems to crash l... -
02:15 PM Revision c4cbaef2 (git): assert_cpu_usage_low with timeout scale
- * test/lib/test/unit/assertions.rb (assert_cpu_usage_low): apply
the timeout scale to measuring period. this assertion is very
runtime environment dependent. -
02:15 PM Revision 42f0a8fd (git): MIN_HZ and MIN_MEASURABLE constants
- * test/lib/test/unit/assertions.rb (Test::Unit::Assertions):
promoted MIN_HZ and MIN_MEASURABLE as constants, which should be
constant through the process. -
02:15 PM Revision eb016d83 (git): Generalize timeout_scale
- * test/lib/test/unit.rb (Test::Unit::TimeoutOption): renamed
SubprocessOption.
* test/lib/test/unit.rb (Test::Unit::TimeoutOption#setup_options):
prefer `--timeout-scale` option.
* test/lib/test/unit.rb (Test::Unit::TimeoutOption#n... -
01:31 PM Revision 39ae88ad (git): Refined syntax error messages
-
01:25 PM Feature #15912 (Closed): Allow some reentrancy during TracePoint events
- I got a report in byebug about byebug being incompatible with zeitwerk. This one: https://github.com/deivid-rodriguez/byebug/issues/564. This is a problem because zeitwerk is the default Rails code loader, and byebug is the default Rails...
-
12:55 PM Feature #9123: Make Numeric#nonzero? behavior consistent with Numeric#zero?
- Quite a long old discussion. I checked before replying, to make sure I don't comment too often
in one particular issue. So this is my first reply; and I will try to make comments that summarize
my opinion.
First, I would like to sta... -
10:08 AM Bug #15911 (Closed): Missing TracePoint return event for ||=
- Thank you for your report.
I can reproduce the issue at ruby 2.6.3, and cannot do at master branch. It looks like the issue is already fixed by 1bc6c3f40777ca10d8e7df38b775b0bb81a25881. Please wait for the backport. -
08:00 AM Bug #15911 (Closed): Missing TracePoint return event for ||=
- While updating ruby-prof, I ran into an issue while profiling rails that caused ruby-prof to show an incorrect method invocation tree. This is caused by the use of the ||= operator in minitest.
Here is a small test case:
```
class... -
06:22 AM Revision 140b8117 (git): &. is not allowed inside LHS of massign
- https://hackerone.com/reports/605262
-
03:33 AM Revision 42ac8890 (git): Fail test if load ~/.irbrc
-
03:16 AM Revision e4364dbf (git): Fixed the code-style with the upstream rule.