Project

General

Profile

Activity

From 12/27/2017 to 01/02/2018

01/02/2018

11:27 PM Feature #14274 (Open): Merge Std-Lib Time Class into Core
Please excuse me if this is a duplicate or already asked-and-answered. I won't be offended by an automatic close.
I personally find it confusing when to use the Core version of the `Time` class versus the Std-Lib `require "time"` vers...
ecbrodie (Evan Brodie)
10:48 PM Bug #14234: Failed to build on CentOS 6.9
Do we know when the next version of ruby is likely to be released, and if it will include this patch? I'm trying to build ruby 2.5.0 for CentOS 6 and running into this same issue. ewaters (Evan Waters)
09:51 PM Revision 7bbff604 (git): variable.c: fix autoload stack space regression
r61560 ("offsetof(type, foo.bar) is (arguably) a GCCism")
introduced 16 bytes of stack overhead on 64-bit systems.
Remove that overhead and cast, instead. While we're at it,
restore the "waitq" name to clarify the purpose of the field.
...
Eric Wong
09:23 PM Revision 2244bf57 (git): thread_pthread.c: use container_of
It's easier to read this macro from ccan than open-coding pointer
arithmetic.
thread_pthread.c (ubf_wakeup_all_threads): use container_of
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
08:40 PM Bug #14273 (Closed): Stack Consistency Error from return in loop
```ruby
def foo(x)
unless x
while !x
return nil
end
end
end
foo(nil)
```
```
(irb):18: [BUG] Stack consistency error (sp: 100, bp: 101)
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17]
-- Cras...
ccutrer (Cody Cutrer)
03:29 PM Revision 751c64f8 (git): * 2018-01-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:29 PM Revision cff48e44 (git): check an existence of block.
* gc.c (rb_raw_obj_info): check block before using it.
* vm_core.h (vm_block_iseq): r61565 introduced NULL check but this
check is only needed by `rb_raw_obj_info()` and it is called at GC
debug mode. Above fix for `rb_raw_obj_info(...
ko1 (Koichi Sasada)
02:31 PM Bug #14269: backport r61562, r61563, r61566, r61568, r61569 (fix SEGV touching uninitialized memory)
r61566 については ruby_2_3 では switch 文に default 節があるため未初期化のままアクセスされることはなく SEGV は発生しないと思いますが、初期化しておいて悪いことはないと思い REQUIRED のチケットに含めました。しかし backport は不要かもしれませんので最終判断は usa さんにお任せします。 nagachika (Tomoyuki Chikanaga)
12:51 PM Bug #14269 (Closed): backport r61562, r61563, r61566, r61568, r61569 (fix SEGV touching uninitialized memory)
backport 管理用チケットです。 nagachika (Tomoyuki Chikanaga)
02:24 PM Bug #14272 (Closed): backport r61561 (fix memory leak (FOUND BY A COMPILER WARNING))
backport 管理用のチケットです。 nagachika (Tomoyuki Chikanaga)
02:09 PM Bug #14271 (Closed): Random TestIO_Console#test_oflush failure
From time to time, I observe the following test suite error:
~~~
1) Failure:
TestIO_Console#test_oflush [/builddir/build/BUILD/ruby-2.5.0/test/io/console/test_io_console.rb:215]:
Expected ["b", "ab"] to include "a".
~~~
vo.x (Vit Ondruch)
12:57 PM Bug #14270 (Closed): backport r61564, r61565, r61571 (fix SEGV touching uninitialized memory)
backport 管理用チケットです。 nagachika (Tomoyuki Chikanaga)
10:59 AM Feature #11473: Immutable String literal in Ruby 3
FWIW, Rubocop suggests now in recent versions that you use the "unary plus" as the "one-character" approach to thaw a frozen string: http://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Performance/UnfreezeString
More details in the PR th...
perlun (Per Lundberg)
08:53 AM Feature #14268 (Closed): [PATCH] net/protocol: optimize large read case
```
Any comment? Will commit in a few days if none.
net/protocol: optimize large read case
There are several places where rbuf_consume is called with
@rbuf.size as its length arg; simplify that case by avoiding
the slow String#...
normalperson (Eric Wong)
06:59 AM Bug #14260: test failure related with proc arity on 32-bit environment (e.g. Solaris 10 with 32-bit compile)
ngoto (Naohisa Goto) wrote:
> >> ビットフィールドのデフォルトは unsigned int というのがCの規格にて定められていますが、
> ...
調査していただいてありがとうございました。そのような状況であれば裸のintの利用は控えてsignedかunsignedを明示したほうが良さそうですね。修正は妥当そうだと思いました。
shyouhei (Shyouhei Urabe)
06:52 AM Feature #14045: Lazy Proc allocation for block parameters
> Don't report a bug on a closed feature, report it as a new bug (and link to the feature), thanks.
Thanks, I wasn't aware which way was preferred. I've opened #14267 to report this as a new bug.
> ...
Agreed, but when dealing wit...
myronmarston (Myron Marston)
01:10 AM Feature #14045: Lazy Proc allocation for block parameters
myronmarston (Myron Marston) wrote:
> This change introduces a bug in RSpec. I'm working on a work around for RSpec (and hope to cut a release with a fix soon) but users running Ruby 2.5 with an older RSpec version will be affected, an...
duerst (Martin Dürst)
06:47 AM Feature #14267 (Closed): Lazy proc allocation introduced in #14045 creates regression
The following script consistently prints `Proc equality: true` on versions of Ruby before 2.5, but prints `Proc equality: false` on Ruby 2.5:
``` ruby
# regression.rb
def return_proc(&block)
block
end
def return_procs(&block)...
myronmarston (Myron Marston)
06:46 AM Revision 6faadd78 (git): include missing header
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e shyouhei (Shyouhei Urabe)
06:42 AM Revision 5b184f27 (git): fix SEGV inspecting uninitialized objects
obj_info() assumes the given object is alive. OTOH
gc_writebarrier_incremental is called before or in middle of
object initialization. Can casue SEGV.
(lldb) run
Process 48188 launched: './miniruby' (x86_64)
Process 48188 stopped
* th...
shyouhei (Shyouhei Urabe)
06:42 AM Revision 1d4129d9 (git): fix SEGV inspecting already freed objects
obj_info() assumes the given object is alive. Passing freed
objects to it results in SEGV.
(lldb) run
Process 29718 launched: './miniruby' (x86_64)
Process 29718 stopped
* thread #1: tid = 0x3082c5, 0x00000001000bfaab miniruby`pathobj_...
shyouhei (Shyouhei Urabe)
06:42 AM Revision 13af45c0 (git): fix uninitialized variable
Likewise this can easily be noticed if you read the warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
06:42 AM Revision 54983030 (git): fix SEGV touching uninitialized local variable
This imemo_name is used uninitialized because the switch
above does not cover all possible imemo types.
(lldb) run
Process 26068 launched: './miniruby' (x86_64)
Process 26068 stopped
* thread #1: tid = 0x14ba96, 0x00007fff8a402132 libsy...
shyouhei (Shyouhei Urabe)
06:42 AM Revision 20389994 (git): fix SEGV touching uninitialized memory
This function can be called from rb_data_typed_object_zalloc().
No assumption can be made about object internals.
(lldb) run
Process 22135 launched: './miniruby' (x86_64)
Process 22135 stopped
* thread #1: tid = 0x14a3af, 0x000000010008...
shyouhei (Shyouhei Urabe)
06:42 AM Revision 9aabe5a5 (git): fix SEGV touching uninitialized memory
This function can be called from Init_VM().
No assumption can be made about object internals.
(lldb) run
Process 15734 launched: './miniruby' (x86_64)
Process 15734 stopped
* thread #1: tid = 0x1441d4, 0x00000001000bdfcb miniruby`rb_raw...
shyouhei (Shyouhei Urabe)
06:41 AM Revision cce479d6 (git): fix SEGV touching uninitialized memory
This function can be called from InitVM_Object().
No assumption can be made about object internals.
(lldb) run
Process 10675 launched: './miniruby' (x86_64)
Process 10675 stopped
* thread #1: tid = 0x14252c, 0x00000001000bdda9 miniruby`...
shyouhei (Shyouhei Urabe)
06:41 AM Revision 58517060 (git): fix SEGV touching uninitialized memory
This function can be called from boot_defclass().
No assumption can be made about object internals.
(lldb) run
Process 2386 launched: './miniruby' (x86_64)
Process 2386 stopped
* thread #1: tid = 0x13f3b6, 0x00000001001e0b26 miniruby`rb...
shyouhei (Shyouhei Urabe)
06:41 AM Revision e5914dd4 (git): fix memory leak (FOUND BY A COMPILER WARNING)
Confusion of argument order ignores this st_free_table.
Results in garbaged table not GCed.
Easily noticable when you read the compiper warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
06:41 AM Revision 5471bf9c (git): offsetof(type, foo.bar) is (arguably) a GCCism
TL;DR see http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2031.htm
Suppose we have:
struct X {
struct Y {
z_t z;
} y;
} x;
then, you _cant_ infer offsetof(struct X, y.z). The ISO C99 section
7.17 says nothing about such situa...
shyouhei (Shyouhei Urabe)
06:41 AM Revision 8dc0c7c0 (git): comparing function pointer versus void* is a GCCism
However dlsym() requires such feature so this function is non-
portable by nature. Cannot but suppress warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
06:41 AM Revision 1f76918a (git): label as lvalue is a GCCism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e shyouhei (Shyouhei Urabe)
06:41 AM Revision a6b50f37 (git): statement experssion is a GCCism
should mark as such.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
06:41 AM Revision a5a5714b (git): enum value grater than int is a GCCism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e shyouhei (Shyouhei Urabe)
06:41 AM Revision 8ebe5da2 (git): _Static_assert is a C11ism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e shyouhei (Shyouhei Urabe)
06:41 AM Revision db5d556f (git): bit-fields other than int is a C99ism
To be precise C90 says "A bit-field may have type int, unsigned
int, or signed int". It is clear that char or enum are NG.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
06:41 AM Revision b8f8c202 (git): initializer paren-string `{("str")}` is a C99ism
First, `"str"` is a string constant but `("str")` is not. It is a
random expression whose type happen to be const char*. Second,
non-constant initializer element is forbidden in C90. Mixture of
these two results in the fact that `{("s...
shyouhei (Shyouhei Urabe)
06:41 AM Revision dfb24be6 (git): string literal longer than 509 characters is a C99ism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e shyouhei (Shyouhei Urabe)
06:41 AM Revision 11c19de7 (git): flexible array member is a C99ism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e shyouhei (Shyouhei Urabe)
06:41 AM Revision 91715ee5 (git): long long is a C99ism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e shyouhei (Shyouhei Urabe)
06:41 AM Revision 1836af76 (git): comma at the end of enum is a C99ism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e shyouhei (Shyouhei Urabe)
06:41 AM Revision 67b547d0 (git): __VA_ARGS__ is a C99ism
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e shyouhei (Shyouhei Urabe)
06:41 AM Revision ef19834e (git): long long is a C99sim
Don't assume 8-bytes integers == "long long".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
06:41 AM Revision f6f1cfcb (git): string literal longer than 509 characters is a C99ism
Should avoid such thing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
06:41 AM Revision 76091d43 (git): "%z" printf format specifier is a C99ism
PRIxSIZE is also. But shimmed in ruby.h
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
06:41 AM Revision f03146dd (git): int (*)(void) is incompatible with void*
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e shyouhei (Shyouhei Urabe)
06:41 AM Revision 3f1ef729 (git): rb_insn_func_t is incompatible with void*
Why not just use void* ?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
06:41 AM Revision b6a2d63e (git): explicit cast to void* required for %p
These functions take variadic arguments so no automatic type
promotion is expected. You have to do it by hand.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
shyouhei (Shyouhei Urabe)
06:41 AM Revision b4b0e8bd (git): suppress warning for clang
In this function, "volatile" is specified twice in macro-expanded
`VAR_INITIALIZED(cont)` part. That is a problem in fact. However
I don't want to touch this line because it is already a messy
workaround for clang SEGV. Let me just ig...
shyouhei (Shyouhei Urabe)
04:24 AM Revision 035db929 (git): parse.y: fix typo
* parse.y (singleton): fix typo, show the expression.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
04:20 AM Bug #14265 (Third Party's Issue): Possible bug in OpenSSL library
Duplicate of [Bug #12561]. Current versions of Ruby/OpenSSL raise an exception:
$ ruby a.rb
plaintext: 030fa889aa00fc6554023a9aad8c9ca1776861746576730000000000000000000000000000000000000000000000000000000000000000000000000000000000...
rhenium (Kazuki Yamaguchi)
03:00 AM Revision 58d01fc1 (git): * 2018-01-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:00 AM Revision 6e2ceaf0 (git): parse.y: code end position
* parse.y (parser_yyerror): use the given location as the end of
erred code, instead of the current position.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:24 AM Bug #14266 (Closed): Set#clone(freeze: false) makes frozen internal hash
```
% irb -r irb/completion --simple-prompt
>> require 'set'
=> true
> ...
=> #<Set: {}>
>> set.frozen?
=> false
> ...
=> true
```
In `Set#initialize_clone`, clone hash without freeze keyword argument.
But I think there is no...
znz (Kazuhiro NISHIYAMA)

01/01/2018

09:52 PM Bug #14265 (Third Party's Issue): Possible bug in OpenSSL library
Hi,
I'm not sure if this is a bug or not, but there is a difference between Ruby and
Python when using Blowfish encryption in ECB mode. Using the same algorithm parameters, and the same input, the encrypted output is completely diff...
careta (Dumb Thomas)
08:31 PM Feature #14045: Lazy Proc allocation for block parameters
For those who are interested, the work around I've implemented in RSpec is [here](
https://github.com/rspec/rspec-core/pull/2497/commits/84670489bb4943a62e783bd65f96e4b55360b141):
``` patch
From 84670489bb4943a62e783bd65f96e4b55360b...
myronmarston (Myron Marston)
08:14 PM Feature #14045: Lazy Proc allocation for block parameters
This change introduces a bug in RSpec. I'm working on a work around for RSpec (and hope to cut a release with a fix soon) but users running Ruby 2.5 with an older RSpec version will be affected, and the slight change in semantics introd... myronmarston (Myron Marston)
07:41 PM Feature #9145: Queue#pop(true) return nil if empty instead of raising ThreadError
How about a block form where the block is called with the popped element? The method would return false if called with non_block set to true if the queue is empty.
q = Queue.new
q << 1
q << 2
q << 3
while q.pop(true){|x| p x}
uwe@kubosch.no (Uwe Kubosch)
05:41 PM Bug #14263: Array Intersection does not seem to use hash
> If two instances are .eql? but their hashes are not
Then `eql?` or `hash` are ill-defined. The definition of `hash` is that any two objects that are `eql?` must have identical `hash` values. Note that objects that are not `eql?` may...
marcandre (Marc-Andre Lafortune)
03:23 PM Bug #14264 (Closed): RDoc comment of warn does not mention uplevel:
`Kernel#warn` support uplevel keyword argument since 2.5.0, but rdoc does not mention it.
https://github.com/ruby/ruby/blob/691b05e83c41d089c4f6c7a8bbac9dd63f36a144/error.c#L309-L325
znz (Kazuhiro NISHIYAMA)
01:18 PM Revision 691b05e8 (git): vm_core.h: make the algorithm of get_insn_info selectable
Currently, VM_INSN_INFO_TABLE_IMPL == 0 means linear search, and
VM_INSN_INFO_TABLE_IMPL == 1 means binary search. I plan to add
succinct bitvector algorithm later.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61537 b2dd03c8-39d4-...
mame (Yusuke Endoh)
12:51 PM Revision 295838e6 (git): iseq.h: Extract position array from iseq_insn_info_entry
This makes TracePoint a bit fast by reducing cache misses of
`get_insn_info_binary_search`.
Also, I plan to use succinct bitvector algorithm for `get_insn_info`
instead of binary search. This change will make it easy.
git-svn-id: svn+...
mame (Yusuke Endoh)
09:30 AM Revision e1fce44c (git): iseq.c: fix build error when VM_CHECK_MODE is enabled
Follow up of r61534. Sorry.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
mame (Yusuke Endoh)
09:16 AM Revision fd950df7 (git): vm_core.h: refactoring of insns_info
This factors rb_iseq_constant_body#insns_info and #insns_info_size to
struct iseq_insn_info.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
mame (Yusuke Endoh)
01:04 AM Revision d4764ef6 (git): parse.y: highlight yyerror
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
12:13 AM Revision da0c6035 (git): [DOC] doc/NEWS-2.5.0: remove trailing comma [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)

12/31/2017

11:29 PM Revision 447fdd42 (git): Removed debug code. It is inconsistency in rubygems upsteream.
Revert r58657, r58660, r58692, r58723.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt (Hiroshi SHIBATA)
09:59 PM Bug #14263 (Closed): Array Intersection does not seem to use hash
According to the documentation for Array#&, comparison is done using hash and eql? However, this does not seem to be the case in 2.5.0.
If two instances are .eql? but their hashes are not, an array & should be empty:
~~~ ruby
([Va...
gkellogg (Gregg Kellogg)
04:28 PM Bug #14260: test failure related with proc arity on 32-bit environment (e.g. Solaris 10 with 32-bit compile)
>> ビットフィールドのデフォルトは unsigned int というのがCの規格にて定められていますが、
> ...
ご指摘のとおり、元の記述は間違いでした。
正しくは implementation-defined でしたので訂正します。ご指摘ありがとうございました。
原本は私も手元には無いのですが、C99 では 6.7.2.1 に書かれているとのことです。
参考にしたページ: http://en.cppreference.com/w/c/lang...
ngoto (Naohisa Goto)
01:22 PM Bug #14260: test failure related with proc arity on 32-bit environment (e.g. Solaris 10 with 32-bit compile)
> ビットフィールドのデフォルトは unsigned int というのがCの規格にて定められていますが、
ごめんなさい、いま家にいてCの規格にアクセスできないのですが、そのような規定があった記憶がないです。どこのセクションに書いてありましたでしょうか?
shyouhei (Shyouhei Urabe)
11:46 AM Bug #14260: test failure related with proc arity on 32-bit environment (e.g. Solaris 10 with 32-bit compile)
問題の bit field は r59358 で(2017-07-18)導入されていたものなので 2.5 のみ REQUIRED にしておきます。 nagachika (Tomoyuki Chikanaga)
03:05 PM Revision 5ceb1370 (git): parse.y: yyerror1
* parse.y (yyerror1): pass location to parser_yyerror.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:00 PM Revision 374e7c79 (git): * 2018-01-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:00 PM Revision 862189c7 (git): parse.y: yylloc at yyerror
* parse.y (parser_yyerror): consider the case first_loc and
last_loc point different lines.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:15 PM Revision c5f4c44f (git): error.c: limit depth
* error.c (rb_warn_m): limit backtrace depth to reduce objects to
be created but not used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:12 PM Revision 487efc80 (git): test_exception.rb: more assertions
[ruby-core:84568] [Bug #14262]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:01 PM Bug #14262 (Closed): ArgumentError (negative level (-1)) when `warn "test message", uplevel: -2`
Applied in changeset trunk|r61525.
----------
error.c: negative uplevel
* error.c (rb_warn_m): negative uplevel is not allowed.
[ruby-core:84568] [Bug #14262]
nobu (Nobuyoshi Nakada)
10:33 AM Bug #14262 (Closed): ArgumentError (negative level (-1)) when `warn "test message", uplevel: -2`
When `uplevel: -2`, error message says `negative level (-1)`.
When `uplevel: -1`, no exception occur.
What is expected behavior?
```
% irb -r irb/completion --simple-prompt
>> warn("test", uplevel: -1)
(irb):1: warning: test
=> ...
znz (Kazuhiro NISHIYAMA)
01:01 PM Revision fa2e4a20 (git): error.c: negative uplevel
* error.c (rb_warn_m): negative uplevel is not allowed.
[ruby-core:84568] [Bug #14262]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
12:21 PM Revision d0afbff3 (git): prelude.c.tmpl: get rid of warnings on old gcc
* template/prelude.c.tmpl: ignore missing-field-initializers on
old gcc, e.g. 4.4, which does not support pushing/popping
diagnostics.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
11:50 AM Bug #14261: invalid syntax segfaults: "x, true"
I can reproduce SEGV with 2.5.0.
I cannot reproduce with 2.4.3 but I cannot say with confidence that the recent changes cause the SEGV.
I'd like to do `bisect` when I have a time.
nagachika (Tomoyuki Chikanaga)
11:25 AM Bug #14261 (Closed): invalid syntax segfaults: "x, true"
Applied in changeset trunk|r61523.
----------
parse.y: assignable_error
* parse.y (assignable_gen): should return valid NODE always even
on errors. [ruby-core:84565] [Bug #14261]
nobu (Nobuyoshi Nakada)
11:25 AM Revision 45752157 (git): parse.y: assignable_error
* parse.y (assignable_gen): should return valid NODE always even
on errors. [ruby-core:84565] [Bug #14261]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
06:53 AM Revision 59845bd4 (git): parse.y: yylloc at yyerror
* parse.y (parser_yyerror): utilize the location given by bison.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:40 AM Bug #14226: Revert line number of "return", "b-return" and "end" events
> I propose you create a new feature for this
Thanks Martin.
I will create it.
dsferreira (Daniel Ferreira)
12:06 AM Revision fb112a8c (git): fix reset order.
* lib/rdoc/test_case.rb (setup): call `RDoc::Markup::PreProcess.reset`
at the end of `setup` method.
`RDoc::RDoc.new` requires `rdoc/generator/darkfish`
and requires `rdoc/tom_doc.rb` at last. It add post_proecssor
(at `add_post_...
ko1 (Koichi Sasada)

12/30/2017

11:06 PM Revision a9170f0d (git): increase test timeout.
* test/ruby/test_thread.rb (test_signal_at_join): increase timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ko1 (Koichi Sasada)
11:03 PM Bug #14259: Integer#pow returns an invalid result with large modulo
Another example:
~~~
2.pow(61, 9213693951) # => 1
~~~
Expected following result:
~~~
(2 ** 61) % 9213693951 # => 5432161352
~~~
andrykonchin (Andrew Konchin)
02:50 PM Bug #14259 (Closed): Integer#pow returns an invalid result with large modulo
Applied in changeset trunk|r61517.
----------
numeric.c: Fix Integer#pow with a large Fixnum modulo
* numeric.c: Fix Integer#pow with a large Fixnum modulo
[Bug #14259] [ruby-core:84562]
* test/ruby/test_numeric.rb: add assertions f...
mrkn (Kenta Murata)
02:24 PM Bug #14259 (Closed): Integer#pow returns an invalid result with large modulo
```
irb(main):020:0> 12.pow(1, 10000000000)
=> 1
irb(main):021:0> 12.pow(1, 10000000001)
=> 1
irb(main):022:0> 12.pow(1, 10000000002)
=> 1
```
These results should be `12`.
mrkn (Kenta Murata)
10:19 PM Bug #14261 (Closed): invalid syntax segfaults: "x, true"
The `item' arg passed to list_append_gen is NULL, so it segfaults.
It happens on both x86 (32-bit) and x86-64 Linux.
I'm not familiar with the parser, so I will let a parser expert fix this.
```
./miniruby -e "x, true"
-e:1: Can...
normalperson (Eric Wong)
08:34 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
I should have watched/read your great "Just-In-Time Compiler for MRI" presentation first:
https://www.youtube.com/watch?v=Ti4a7SXGWig
https://speakerdeck.com/k0kubun/just-in-time-compiler-for-mri
That clearly explains how LLRB, YARV...
Eregon (Benoit Daloze)
04:38 PM Bug #14260 (Closed): test failure related with proc arity on 32-bit environment (e.g. Solaris 10 with 32-bit compile)
Applied in changeset trunk|r61518.
----------
bit fields treating negative values should be declared as signed int
* internal.h (struct vm_ifunc_argc): Bit fields are unsigned by default.
For storing nagative values to bit fields, th...
ngoto (Naohisa Goto)
04:23 PM Bug #14260 (Closed): test failure related with proc arity on 32-bit environment (e.g. Solaris 10 with 32-bit compile)
おそらく r59358 以降、sparc の Solaris 10 上の Oracle Developer Studio (Oracle Solaris Studio) 12.x にて 32ビットでコンパイルした際、
make test-all にて以下のような failure が出るようになりました。
(以下は r61515 での結果)
~~~
1) Failure:
TestLazyEnumerator#test_each_cons_limit [...
ngoto (Naohisa Goto)
04:38 PM Revision 5c600fd5 (git): * 2017-12-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
04:38 PM Revision 2adf2815 (git): bit fields treating negative values should be declared as signed int
* internal.h (struct vm_ifunc_argc): Bit fields are unsigned by default.
For storing nagative values to bit fields, they must be declated as
signed int. Fix multiple test failure observed by 32-bit binaries
compiled with Oracle Dev...
ngoto (Naohisa Goto)
02:50 PM Revision f9292492 (git): numeric.c: Fix Integer#pow with a large Fixnum modulo
* numeric.c: Fix Integer#pow with a large Fixnum modulo
[Bug #14259] [ruby-core:84562]
* test/ruby/test_numeric.rb: add assertions for reproducing this bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61517 b2dd03c8-39d4-4d8f-9...
Kenta Murata
01:29 PM Bug #14246: Inconsistent C source code indentation
I think that guidelines are `.editorconfig` for most editors, `misc/ruby-style.el` for `Emacs`, and `.indent.pro` for `indent`. znz (Kazuhiro NISHIYAMA)
12:10 PM Revision d83e0201 (git): drb: use \A and \z
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
07:51 AM Bug #14226: Revert line number of "return", "b-return" and "end" events
dsferreira (Daniel Ferreira) wrote:
> I take the chance to ask here about something I have been thinking for a very long time.
> ...
That's something more general than this issue. I propose you create a new feature for this, so that it...
duerst (Martin Dürst)
04:37 AM Feature #13890: Allow a regexp as an argument to 'count', to count more interesting things than single characters
Python allows to count strings, as follows:
`str.count(sub[, start[, end]])`
Return the number of non-overlapping occurrences of `substring` `sub` in the range `[start, end]`. Optional arguments `start` and `end` are interpreted as i...
duerst (Martin Dürst)
03:09 AM Feature #14225: untaint hash key strings
> https://bugs.ruby-lang.org/issues/14225

Proposed patch here:
https://80x24.org/spew/20171230025109.1946-1-e@80x24.org/raw
normalperson (Eric Wong)
01:06 AM Feature #12009 (Rejected): [PATCH] psych: pre-freeze string keys for hashes
To be solved in a more general manner [Feature #14225].
(Partially solved for untainted data in [Feature #13725])
normalperson (Eric Wong)
12:00 AM Feature #14258 (Closed): [PATCH] hash literal deduplicates like Hash#[]=
Applied in changeset trunk|r61514.
----------
hash literal deduplicates like Hash#[]=
From: Eric Wong <e@80x24.org>
* hash.c (rb_hash_key_str): new function
(hash_aset_str): use rb_hash_key_str
* internal.h: add rb_hash_key_str
* st...
Anonymous
12:00 AM Revision ff9a3de4 (git): * 2017-12-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
12:00 AM Revision fc939f66 (git): hash literal deduplicates like Hash#[]=
From: Eric Wong <e@80x24.org>
* hash.c (rb_hash_key_str): new function
(hash_aset_str): use rb_hash_key_str
* internal.h: add rb_hash_key_str
* st.c (st_stringify): use rb_hash_key_str
* test/ruby/test_hash.rb (test_NEWHASH_fstring_ke...
Eric Wong

12/29/2017

02:24 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
@k0kubun Thank you for the clarification!
> I understand "a variant of MJIT" means "method JIT compiler that generates C code from ISeq".
Yes, that's exactly what I meant.
I think running https://github.com/noahgibbs/rails_ruby_...
Eregon (Benoit Daloze)
03:31 AM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
> Should the performance of MJIT be evaluated in more details before merging?
Definitely true. This ticket was made in hurry for December Ruby Developers Meeting in Japan, so I did only benchmarks which are easy to run at that moment....
k0kubun (Takashi Kokubun)
12:19 PM Bug #14257 (Closed): the chomp option removes newlines in additon to the provided separator for String#each_line and String#lines
Applied in changeset trunk|r61513.
----------
string.c: chomp rs at the end
* string.c (rb_str_enumerate_lines): should chomp record separator
only, but not a newline, at the end of the receiver as well as
middle, if the separator ...
nobu (Nobuyoshi Nakada)
10:37 AM Bug #14257: the chomp option removes newlines in additon to the provided separator for String#each_line and String#lines
I wanted to have a look but to my surprise, the documentation at:
https://ruby-doc.org/core-2.5.0/String.html#method-i-lines
does not seem to indicate more than one agument to this method?
Either way, could someone perhaps add a...
shevegen (Robert A. Heiler)
12:19 PM Revision 634a48c5 (git): string.c: chomp rs at the end
* string.c (rb_str_enumerate_lines): should chomp record separator
only, but not a newline, at the end of the receiver as well as
middle, if the separator is given.
[ruby-core:84552] [Bug #14257]
git-svn-id: svn+ssh://ci.ruby-lang...
nobu (Nobuyoshi Nakada)
08:51 AM Feature #14258 (Closed): [PATCH] hash literal deduplicates like Hash#[]=
```
We should reuse the same hash key deduplication logic
as Hash#[]= when creating hash literals using the newhash
VM instruction.
* hash.c (rb_hash_key_str): new function
(hash_aset_str): use rb_hash_key_str
* internal.h: add...
normalperson (Eric Wong)
06:47 AM Revision 18640bf9 (git): test/ruby/test_hash: minor test cleanup
Prep work for proposed behavior change:
https://bugs.ruby-lang.org/issues/14225
* test/ruby/test_hash.rb (test_tainted_string_key): assert_predicate
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61512 b2dd03c8-39d4-4d8f-98ff-823fe6...
Eric Wong
06:47 AM Feature #14223: Refinements で定義した #to_proc が &hoge 時に呼ばれないのを緩和する提案
nobu (Nobuyoshi Nakada) wrote:
> 賛成です。
返信して頂き、ありがとうございます。
> ...
ありがとうございます。修正しました。
これで問題ないでしょうか。
osyo (manga osyo)

12/28/2017

11:11 PM Bug #14257 (Closed): the chomp option removes newlines in additon to the provided separator for String#each_line and String#lines
I'm not entirely sure this is a bug but I had a hard time finding anything that indicated that the change was on purpose.
The `chomp` option would remove the provided separator from each line. Now it does that and it also removes newl...
AaronLasseigne (Aaron Lasseigne)
10:45 PM Feature #14022: String#surround
> But for this really frequent case surround() still feels more elegant.
Agreed. It is not so frequent for my case, to be honest; but I like
the use case that sawa described since that is similar to ones I
experienced too, in regard...
shevegen (Robert A. Heiler)
10:31 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
Eregon (Benoit Daloze) wrote:
> Merging the MJIT infrastructure means choosing MJIT as the MRI JIT, right?
Taking a closer look at the PR, it seems mostly infrastructure for a MJIT-like JIT.
On the other hand, mjit_compile.c is co...
Eregon (Benoit Daloze)
10:09 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
Should the performance of MJIT be evaluated in more details before merging?
Merging the MJIT infrastructure means choosing MJIT as the MRI JIT, right?
If so, it would be good to have performance numbers on other larger benchmarks, no...
Eregon (Benoit Daloze)
08:09 PM Feature #14250 (Closed): Make `$SAFE` process global state and allow to set 0 again
Applied in changeset trunk|r61510.
----------
`$SAFE` as a process global state. [Feature #14250]
* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to
`rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global sta...
ko1 (Koichi Sasada)
02:32 AM Feature #14250: Make `$SAFE` process global state and allow to set 0 again
FYI: by using [gem-codesearch](https://github.com/akr/gem-codesearch), I have briefly searched the gems using $SAFE:
```
$ csearch -f '.*\.rb' '^\s*[^\s#].*\$SAFE *=' | wc -l
147
```
Much less than I thought... The full list is...
mame (Yusuke Endoh)
08:09 PM Revision ccbd6ee5 (git): * 2017-12-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
08:09 PM Revision c39bdb79 (git): `$SAFE` as a process global state. [Feature #14250]
* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to
`rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state.
* vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc`
objects don't need to ...
ko1 (Koichi Sasada)
04:40 PM Bug #13774: for methods defined from procs, the binding of the resulting bound_method.to_proc does not have access to the original proc's closure environment
nobu (Nobuyoshi Nakada) wrote:
> I think it is not a bug.
> ...
You are accessing a local variable in the method (which does not exist until the method is invoked), whereas I am accessing a variable outside the method, captured by the ...
bughit (bug hit)
08:21 AM Bug #13774: for methods defined from procs, the binding of the resulting bound_method.to_proc does not have access to the original proc's closure environment
I think it is not a bug.
Local variables are not set up in the context of a binding from a method.
```ruby
$ ruby -e 'def m(v=12);v;end; p method(:m).to_proc.binding.eval("v")'
Traceback (most recent call last):
2: from -e:1:in...
nobu (Nobuyoshi Nakada)
08:28 AM Revision 67850e8a (git): proc.c: empty iseq names
* proc.c (proc_binding): unified the name and realpath of an empty
iseq.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
05:53 AM Feature #14255 (Closed): Deprecate $SAFE support in ERB
Changed from ruby-dev to ruby-core https://bugs.ruby-lang.org/issues/14256 k0kubun (Takashi Kokubun)
05:35 AM Feature #14255 (Closed): Deprecate $SAFE support in ERB
See https://bugs.ruby-lang.org/issues/14250.
Proc-level $SAFE change does no longer make sense. This should be deprecated and then removed. But the problem is that the position of safe_level argument is in the middle of argument list ...
k0kubun (Takashi Kokubun)
05:51 AM Feature #14256 (Closed): Deprecate $SAFE support in ERB and let ERB.new take keyword arguments for it
See https://bugs.ruby-lang.org/issues/14250.
Proc-level $SAFE change does no longer make sense. This should be deprecated and then removed. But the problem is that the position of safe_level argument is in the middle of argument list ...
k0kubun (Takashi Kokubun)
05:07 AM Revision 9006d059 (git): erb.rb: let's remove constant deprecated at 2.5
(r59497).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
k0kubun (Takashi Kokubun)
03:27 AM Bug #14254 (Closed): vagrant add box not working
i tried running the following command (vagrant box add centos65-base centos65.box) but encountered the error below. I have reinstall Vagrant, VirtualBox and Ruby but no success. Any help would be really useful.
λ vagrant box add cento...
felixtheflex (felix felix)
03:05 AM Bug #14252: Refined Method Visibility Lost with Dynamic Dispatch and Reflection
I, personally, do not care so much about the reflection APIs, as I was just using them to confirm what I thought was happening, but I would like to at least see `Kernel#public_send` act similarly to `Kernel#send`, so I think it makes sen... sonnym (Sonny Michaud)
02:28 AM Bug #14252: Refined Method Visibility Lost with Dynamic Dispatch and Reflection
sonnym (Sonny Michaud) wrote:
> This works perfectly well for the static `Protected.print` call, but has a number of surprises when trying to do anything more advanced. Namely:
> ...
Reflection APIs do not honor refinements.
If you b...
shugo (Shugo Maeda)
01:32 AM Bug #14252 (Closed): Refined Method Visibility Lost with Dynamic Dispatch and Reflection
Consider the following simple objects, one with a protected class method and another with a public class method calling on the protected method. This is accomplished using a refinement that marks the method as public on the singleton cl... sonnym (Sonny Michaud)
03:01 AM Bug #14251 (Rejected): String insert changing value of other string
This behavior is expected. Except for purely functional programming languages, the difference between references and values is important to understand in every programming language, even if at first, it may be surprising. duerst (Martin Dürst)
12:58 AM Bug #14251: String insert changing value of other string
I advise you to put this “issues” you find as questions in ruby talk before opening ruby core bugs.
In ruby objects are mutable and passed by reference.
When you do `bar = bar + 'ccc'`
you are allocating a new reference to bar obj...
dsferreira (Daniel Ferreira)
12:47 AM Bug #14251: String insert changing value of other string
Because if you do
~~~ ruby
foo = 'aaa'
bar = foo
bar = bar + 'ccc' #here references of foo doesn't changes
puts foo #aaa
pubs bar #aaaccc
~~~
As I can see, ruby only for string as reference when I call string methods, like:...
ricardovsilva (Ricardo Silva)
02:55 AM Bug #14253 (Closed): CSV.generate doesn't wrap a string anymore
linking with: https://github.com/ruby/csv/pull/13/files ahorek (Pavel Rosický)
12:00 AM Bug #14247 (Closed): Thread#fetch raise KeyError without key and receiver
Applied in changeset trunk|r61507.
----------
Fix KeyError#{key,receiver} of Thread#fetch
[ruby-core:84508] [Bug #14247]
Anonymous
12:00 AM Revision 220d2a71 (git): Fix KeyError#{key,receiver} of Thread#fetch
[ruby-core:84508] [Bug #14247]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
znz (Kazuhiro NISHIYAMA)

12/27/2017

11:51 PM Bug #14251: String insert changing value of other string
Here is a blog entry that may be useful for ricardo:
https://aaronlasseigne.com/2014/07/20/know-ruby-clone-and-dup/
shevegen (Robert A. Heiler)
11:19 PM Bug #14251: String insert changing value of other string
All Ruby variables are by-reference. To create a new object, use #dup
~~~ruby
foo = 'abc'
bar = foo.dup
bar.insert(1, 'd')
~~~
phluid61 (Matthew Kerwin)
10:29 PM Bug #14251 (Rejected): String insert changing value of other string
~~~ ruby
foo = 'abc'
bar = foo
bar.insert(1, d)
puts foo 'adbc'
puts bar 'adbc'
~~~
The example above should only affect bar variable. It leads to an error by programmer.
A bypass that I found is to do:
~~~ ruby
foo = '...
ricardovsilva (Ricardo Silva)
11:51 PM Bug #14219: package size of Ruby 2.5 is larger than 2.4
eregontp@gmail.com wrote:
> Could someone remove spec/rubyspec in SVN? (it's still present in the 2.5.0 tarball)

Done in r61506

> I did a "git mv" if I recall correctly, but it seems git-svn did not handle this case correctly.

...
normalperson (Eric Wong)
11:34 PM Bug #14219: package size of Ruby 2.5 is larger than 2.4
Could someone remove spec/rubyspec in SVN? (it's still present in the 2.5.0 tarball)
I did a "git mv" if I recall correctly, but it seems git-svn did not handle this case correctly.
I think it makes sense to keep spec/mspec and spec/...
Eregon (Benoit Daloze)
11:41 PM Feature #14225: untaint hash key strings
eregontp@gmail.com wrote:
> Issue #14225 has been updated by Eregon (Benoit Daloze).
>
>
> I think we should remove tainting as a whole along with $SAFE.

Agreed.

> Untainting automatically seems bad practice and counter-intu...
normalperson (Eric Wong)
11:16 PM Feature #14225: untaint hash key strings
I think we should remove tainting as a whole along with $SAFE.
Untainting automatically seems bad practice and counter-intuitive.
Eregon (Benoit Daloze)
11:40 PM Revision 5b94fc96 (git): remove empty spec/rubyspec directory
* spec/rubyspec: remove empty directory trees
[ruby-core:84533]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
09:18 PM Revision 74f14d69 (git): Update to ruby/spec@b95d7ed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Eregon (Benoit Daloze)
08:39 PM Feature #7792: Make symbols and strings the same thing
> Leaving aside the issue of semantics for a moment, can anyone provide a real, concrete example of a situation where symbols could not trivially be replaced with strings without negatively impacting the functionality of the surrounding ... dsferreira (Daniel Ferreira)
08:28 PM Feature #7792: Make symbols and strings the same thing
Leaving aside the issue of semantics for a moment, can anyone provide a real, concrete example of a situation where symbols could not trivially be replaced with strings without negatively impacting the functionality of the surrounding co... Ajedi32 (Ajedi32 W)
07:52 PM Feature #7792: Make symbols and strings the same thing
> I think it's far more common to use symbols correctly than incorrectly. The only time I see confusion is when using things like HashWithIndifferentAccess.
Let me give you just this example to show you how things are out of control:
...
dsferreira (Daniel Ferreira)
05:35 PM Feature #7792: Make symbols and strings the same thing
dsferreira (Daniel Ferreira) wrote:
> > But Strings and Symbols represent different concepts and should be treated differently.
> ...
I think it's far more common to use symbols correctly than incorrectly. The only time I see confusio...
jeremyevans0 (Jeremy Evans)
08:08 PM Misc #14222: Mutex.lock is not safe inside signal handler: what is?
eregontp@gmail.com wrote:
> Could MRI simply use the self-pipe trick or similar internally, and execute signal handlers on the main thread by using Ruby's interrupts? (RUBY_VM_CHECK_INTS)
> A bit like Thread#raise except it would exec...
normalperson (Eric Wong)
07:07 PM Misc #14222: Mutex.lock is not safe inside signal handler: what is?
Could MRI simply use the self-pipe trick or similar internally, and execute signal handlers on the main thread by using Ruby's interrupts? (RUBY_VM_CHECK_INTS)
A bit like Thread#raise except it would execute the signal handler instead o...
Eregon (Benoit Daloze)
08:00 PM Bug #14248: configure fails to detect fd_mask type on OS X
Would you mind back porting the fix to the 2.5 branch? drkaes (Stefan Kaes)
02:07 PM Bug #14248 (Closed): configure fails to detect fd_mask type on OS X
Applied in changeset trunk|r61500.
----------
fix fd mask detection on os x
This was broken in r59440 (3215b27a9abd8de793cf517f32d8901fd421eb1c)
[Bug #14248]
From: Stefan Kaes <skaes@railsexpress.de>
nobu (Nobuyoshi Nakada)
12:30 PM Bug #14248: configure fails to detect fd_mask type on OS X
Proposed patch:
https://github.com/skaes/rvm-patchsets/blob/master/patches/ruby/2.5.0/railsexpress/04-fix-fd-mask-detection-on-os-x.patch
drkaes (Stefan Kaes)
12:29 PM Bug #14248 (Closed): configure fails to detect fd_mask type on OS X
When running configure on trunk and/or 2.5.0, configure fails to detect that the type fd_mask exists.
As a consequence, HAVE_RB_FD_INIT gets no set to 1, which leads to rb_fdset_t not being defined.
The bug was introduced with this...
drkaes (Stefan Kaes)
05:41 PM Feature #14250: Make `$SAFE` process global state and allow to set 0 again
Can not comment on $SAFE but I personally have not used $SAFE so far in
like +10 years or so. I can only remember the pickaxe mentioning it, but
I have not used it in any of my ruby code.
A bit off-topic but does anyone remember if ...
shevegen (Robert A. Heiler)
05:01 PM Feature #14250 (Closed): Make `$SAFE` process global state and allow to set 0 again
`$SAFE > 1` is removed from Ruby 2.3 and there are some opinion to remove `$SAFE` feature ([Feature #5455]).
There are several reason, but the biggest reason I think is nobody use `$SAFE` correctly.
Also current `$SAFE` is thread/pro...
ko1 (Koichi Sasada)
05:36 PM Bug #14247: Thread#fetch raise KeyError without key and receiver
Indeed. I actually had to look twice to see the error. :) shevegen (Robert A. Heiler)
01:56 PM Bug #14247: Thread#fetch raise KeyError without key and receiver
Update patch.
```
% ruby -e 'th=Thread.current;th[:foo]=1;th.fetch(:fooo)'
Traceback (most recent call last):
1: from -e:1:in `<main>'
-e:1:in `fetch': key not found: :fooo (KeyError)
Did you mean? :foo
% ruby -e 'th=Th...
znz (Kazuhiro NISHIYAMA)
12:47 PM Bug #14247: Thread#fetch raise KeyError without key and receiver
The given key is `:fooo` symbol, so the message should be `:fooo` but not `"fooo"`.
Use `"%+"PRIsVALUE` instead of `"\"%"PRIsVALUE"\""` for inspection.
nobu (Nobuyoshi Nakada)
12:06 PM Bug #14247 (Closed): Thread#fetch raise KeyError without key and receiver
I found this by message without `Did you mean?`.
expected:
```
% ruby -e 'th=Thread.current;th[:foo]=1;th.fetch(:fooo)'
Traceback (most recent call last):
1: from -e:1:in `<main>'
-e:1:in `fetch': key not found: "fooo" ...
znz (Kazuhiro NISHIYAMA)
05:27 PM Bug #13774: for methods defined from procs, the binding of the resulting bound_method.to_proc does not have access to the original proc's closure environment
```ruby
def foo
o = Object.new
local_var = 'has access to captured variable'

original_proc = ->{local_var}

o.define_singleton_method(:method_from_proc, &original_proc)
method_proc = o.method(:method_from_proc).to_...
bughit (bug hit)
04:14 PM Bug #14243: Comments inside ERB tags broken
Thank you for reverting even though previous behavior was not 100% "correct". jsc (Justin Collins)
12:54 PM Bug #14243: Comments inside ERB tags broken
As I don't have strong motivation to change the behavior, I fixed the behavior to be the same as Ruby 2.4 in r61497. Please use "<%#" for Ruby 2.5.0 and wait for Ruby 2.5.1. k0kubun (Takashi Kokubun)
12:40 PM Bug #14243 (Closed): Comments inside ERB tags broken
Applied in changeset trunk|r61497.
----------
erb.rb: preserve the behavior for invalid syntax
comment. Fix regression at r58948.
I even don't want to deprecate it because deprecation needs to lex all
embedded Ruby script using Ripper...
k0kubun (Takashi Kokubun)
12:33 PM Bug #14243 (Assigned): Comments inside ERB tags broken
k0kubun (Takashi Kokubun)
11:22 AM Bug #14243: Comments inside ERB tags broken
takashikkbn@gmail.com wrote:
> Status changed from Assigned to Rejected
>
> https://github.com/ruby/ruby/commit/abbfc048c5890e8017360bbc845062ea1585e155#diff-e1ea8366d3ac334deab7e0d25309be03 does trigger this behavior, but ERB does ...
normalperson (Eric Wong)
10:44 AM Bug #14243 (Rejected): Comments inside ERB tags broken
https://github.com/ruby/ruby/commit/abbfc048c5890e8017360bbc845062ea1585e155#diff-e1ea8366d3ac334deab7e0d25309be03 does trigger this behavior, but ERB does not support "<% #" syntax. Do you think the code generated at "Before:" is correc... k0kubun (Takashi Kokubun)
12:05 AM Bug #14243 (Assigned): Comments inside ERB tags broken
hsbt (Hiroshi SHIBATA)
04:12 PM Revision a34db218 (git): Update to ruby/spec@0fe33ac
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Eregon (Benoit Daloze)
04:12 PM Feature #14249: Remove str[match_str]
Use Hash#dig instead. naruse (Yui NARUSE)
01:17 PM Feature #14249 (Open): Remove str[match_str]
I wonder if `str[match_str]` makes sense.
``` Ruby
"ana"['a'] => "a"
```
I would say this is not expected and it brings problems, for example when accessing nested hashes. For example:
``` Ruby
params = { "user" => "Nicolas...
ana06 (Ana Maria Martinez Gomez)
04:12 PM Revision 0f989b87 (git): * 2017-12-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
04:12 PM Revision 76402dfa (git): Update to ruby/mspec@5f563e4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e Eregon (Benoit Daloze)
02:50 PM Revision f8fac84c (git): fix concurrent test.
* test/rubygems/test_require.rb (test_concurrent_require):
Synchronizations should be in ensure clause. Sometimes
`require` fails (not sure why) and latch is not released.
Such case introduces unlimited awaiting.
This patch solev...
ko1 (Koichi Sasada)
02:07 PM Revision ecbb1282 (git): fix fd mask detection on os x
This was broken in r59440 (3215b27a9abd8de793cf517f32d8901fd421eb1c)
[Bug #14248]
From: Stefan Kaes <skaes@railsexpress.de>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:35 PM Revision 57e95f38 (git): tool/downloader.rb: don't suppress exception
on the end of retry failure.
Fixed mistake in r61498
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
k0kubun (Takashi Kokubun)
01:32 PM Revision ff6c540a (git): tool/downloader.rb: retry downloads
because it's randomly failing on CI like
https://ci.appveyor.com/project/ruby/ruby/build/1.0.6724
Actually I'm not sure whether the exception class is Errno::ECONNREFUSED
or not. Please change the rescued exception to the correct one if...
k0kubun (Takashi Kokubun)
01:28 PM Feature #14105: Introduce xor as alias for Set#^
@jeremyevans0
> Note that the following core classes also use ^ for exclusive-or:
> ...
That's a good point. Maybe we should consider adding the alias to the 4 classes. My idea with this was trying to make it more readable and easy t...
ana06 (Ana Maria Martinez Gomez)
01:14 PM Feature #14244: Better error messages for scripts with non-matching end statements
I couldn't find a bison API to get the detail of the syntax error, such as what kind of tokens was expected, and what token was actually occurred. Bison just provide us a string of the error message, like 'syntax error, unexpected end-o... mame (Yusuke Endoh)
10:28 AM Feature #14244: Better error messages for scripts with non-matching end statements
Would be nice.
My current "strategy" is to make mostly small changes and see what/if anything breaks.
This is not very sophisticated but it works, sort of.
Reminds me of tenderlove's blog entry about being a puts-debugger; in my c...
shevegen (Robert A. Heiler)
01:16 AM Feature #14244 (Closed): Better error messages for scripts with non-matching end statements
At the party at Speee yesterday, @mame explained that one of his contributions to Ruby 2.5 was to make available information about on which lines code blocks would start and end.
This reminded me of one (actually two) of what I think ...
duerst (Martin Dürst)
12:40 PM Revision c46d3de0 (git): erb.rb: preserve the behavior for invalid syntax
comment. Fix regression at r58948.
I even don't want to deprecate it because deprecation needs to lex all
embedded Ruby script using Ripper and it would be slow. So Let me just
keep this behavior of Ruby 2.4. No change is the best comp...
k0kubun (Takashi Kokubun)
11:08 AM Bug #14246: Inconsistent C source code indentation
duerst@it.aoyama.ac.jp wrote:
> I'm all for better consistency. I thought there were clear
> guidelines for Ruby, and (almost) everybody was following
> them. I didn't know it was that bad.

Right, I remember it being 4 spaces per-...
normalperson (Eric Wong)
10:19 AM Bug #14246: Inconsistent C source code indentation
I'm all for better consistency. I thought there were clear guidelines for Ruby, and (almost) everybody was following them. I didn't know it was that bad.
But fixing spacing will obscure where the code originally came from. I don't rea...
duerst (Martin Dürst)
09:22 AM Bug #14246 (Closed): Inconsistent C source code indentation
I would like to focus on following 238 C source codes in our repository.
```
% git ls-files | grep '\.\(c\|h\|def\)$' | grep -v 'ext|spec|test' | wc -l
238
```
Here, in these 238 files, 10 files are indented using spaces only.
...
shyouhei (Shyouhei Urabe)
10:50 AM Feature #12589: VM performance improvement proposal
These are great news for ruby and it’s community. Thank you both for your great work.
Things can only get better! Long live ruby!
dsferreira (Daniel Ferreira)
09:07 AM Feature #12589: VM performance improvement proposal
Thank you for sharing your thoughts and support.
> So I support your proposal but I guess you should get other ruby developer opinions, especially Koichi's one. I did not check your code.
Today I got code review from Koichi-san an...
k0kubun (Takashi Kokubun)
10:49 AM Feature #14245: Add File.read etc.
> Code like File.read(filename) is considered to
> ...
When added, the documentation should also
briefly mention the reference to pipes.
For example, a few months ago I did not even know
about the leading '|' character - I first s...
shevegen (Robert A. Heiler)
10:01 AM Feature #14245: Add File.read etc.
If I understand this proposal correctly,
this proposal means that adding File.read method and
doesn't change IO.read method?
I.e. IO.read("|command") is works as now?.
I think it is possible direction.
Apart from that, we should...
akr (Akira Tanaka)
08:27 AM Feature #14245 (Closed): Add File.read etc.
Some people use File.open without knowing that it's defined in IO and pipes can be opened.
```
p File.read("|echo hello") #-> "hello"
```
How about to add File.read, File.binread, File.foreach etc. (similar version to File.open)?...
shugo (Shugo Maeda)
10:26 AM Bug #14234: Failed to build on CentOS 6.9
ruby_2_5 r61496 merged revision(s) 61478. naruse (Yui NARUSE)
10:25 AM Revision 09088d03 (git): merge revision(s) 61478: [Backport #14234]
prelude.c.tmpl: get rid of errors with old gcc
* template/prelude.c.tmpl: moved diagnostic pragmas outside
prelude_eval() for very old gcc. [ruby-core:84449] [Bug #14234]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/b...
naruse (Yui NARUSE)
08:30 AM Bug #14239: warn open("|...")
normalperson (Eric Wong) wrote:
> I like that idea, I've been rewriting some stuff to use
> ...
Thanks for your suggestion.
I've created a new ticket #14245.
shugo (Shugo Maeda)
08:08 AM Bug #14239: warn open("|...")
shugo@ruby-lang.org wrote:
> How about to add File.read etc. (similar to File.open) in 2.6?
> Code like `File.read(filename)` is considered to have no intention to open pipes.

I like that idea, I've been rewriting some stuff to use...
normalperson (Eric Wong)
07:59 AM Bug #14239: warn open("|...")
normalperson (Eric Wong) wrote:
> Agreed. I assume this includes IO.read/binread/readlines/...?
I intent this ticket is just for the open method.
For other methods, nobu already added warnings for
File.read("|echo a"), etc.
...
akr (Akira Tanaka)
07:00 AM Bug #14239: warn open("|...")
matz (Yukihiro Matsumoto) wrote:
> Agreed for warnings.
> ...
How about to add File.read etc. (similar to File.open) in 2.6?
Code like `File.read(filename)` is considered to have no intention to open pipes.
shugo (Shugo Maeda)
07:28 AM Revision e1f834f9 (git): spec_helper.rb: libruby.so iff enable-shared
* spec/ruby/optional/capi/spec_helper.rb (compile_extension):
search libruby.so only when enable-shared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:00 AM Revision 8224002b (git): vm_eval.c: expanded eval_string
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
02:55 AM Revision ed6680c1 (git): vm_eval.c: split eval_string_with_cref
* vm_eval.c (eval_string_with_cref): split into cref and scope
modes, which are exclusive.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
02:55 AM Revision 5f0dca59 (git): vm_eval.c: refactor eval_make_iseq
* vm_eval.c (eval_make_iseq): moved preparations of location and
debug print.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:58 AM Revision a1695d9c (git): spec_helper.rb: must find libruby.so
* spec/ruby/optional/capi/spec_helper.rb (compile_extension): if
libruby.so should have been built but is not found, fail early.
get mtime of the library just once.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61491 b2dd03c8-39...
nobu (Nobuyoshi Nakada)
01:26 AM Revision 42c6ef00 (git): fake.rb: set libdir
* tool/fake.rb: set "libdir" to build directory too, so that
spec/ruby/optional/capi/spec_helper.rb can find libruby_so.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
12:42 AM Bug #14238 (Third Party's Issue): With install Ruby 2.5.0 and Passenger 5.1.12 ALL sites will fail to open
hsbt (Hiroshi SHIBATA)
12:40 AM Bug #14242 (Rejected): Fails to build ruby 2.5.0 on CentOS 6
It's duplicated with #14234 hsbt (Hiroshi SHIBATA)
12:04 AM Revision 79487218 (git): * 2017-12-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
12:04 AM Revision c9bdee3e (git): [DOC] Fix typos in downcase [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
 

Also available in: Atom