Project

General

Profile

Activity

From 01/06/2015 to 01/12/2015

01/12/2015

09:12 PM Bug #10735: Memory leak in openssl ossl_pkey_sign
Zachary Scott wrote:
> I know you tried this with 1.9.3, but could you try to repro on trunk (and newer rubies) first?
> ...
Hi Zachary,
Just ran the test case against Ruby 2.3.0dev (2015-01-12 trunk 49226) [x86_64-darwin14] and see...
viktor (Viktor Vasilev)
07:20 PM Bug #10735 (Assigned): Memory leak in openssl ossl_pkey_sign
I know you tried this with 1.9.3, but could you try to repro on trunk (and newer rubies) first?
1.9.3 will be EOL soon, and I want to make sure we fix it upstream before attempting any backports
zzak (zzak _)
06:09 PM Bug #10735 (Closed): Memory leak in openssl ossl_pkey_sign
Similar to the memory leak fixed in https://bugs.ruby-lang.org/issues/9743 there is an issue with ossl_pkey_sign. The ruby heap usage reported through GC.stat remains very stable, while the process heap grows linearly with the number of ... viktor (Viktor Vasilev)
06:23 PM Feature #3187: Allow dynamic Fiber stack size
~~~
Ruby 2.0 already has
RUBY_VM_FIBER_VM_STACK_SIZE
RUBY_FIBER_MACHINE_STACK_SIZE
~~~
Are these environment variables to configure the stack size? Is there documentation on usage? (I mean, what are the units? bytes, kb?) Is th...
jaredbeck (Jared Beck)
04:40 PM Bug #10733: Time.httpdate raises ArgumentError when DateTime.now.httpdate is provided as input

After some experimentation it looks like this has something do with the fact that `DateTime#httpdate` returns an `US-ASCII` encoded string.
```ruby
require 'time'
from_httpdate = DateTime.now.httpdate
as_string = "Mon, 12 J...
mcls (Maarten Claes)
03:21 PM Bug #10733: Time.httpdate raises ArgumentError when DateTime.now.httpdate is provided as input
Another example for Time.httpdate failing.
The third call of Time.httpdate fails, which should be the same as the first call of Time.httpdate.
```ruby
require 'time'
puts RUBY_VERSION
datetime_in_httpdate = DateTime.now.httpda...
zzip (Dale Hofkens)
12:14 PM Bug #10733 (Closed): Time.httpdate raises ArgumentError when DateTime.now.httpdate is provided as input
An irb session demonstrating the bug:
```
irb(main):001:0> require 'time'
=> true
irb(main):002:0> Time.httpdate("Mon, 12 Jan 2015 12:04:15 GMT")
=> 2015-01-12 12:04:15 UTC
irb(main):003:0> DateTime.now.httpdate.to_s
=> "Mon, 12...
mcls (Maarten Claes)
02:33 PM Bug #10734 (Closed): Segfault when combining default arguments with keyword arguments
ktsj (Kazuki Tsujimoto)
02:15 PM Bug #10734: Segfault when combining default arguments with keyword arguments
if i use ruby2.2.0 it does happen for me too ...
and it seems it some kind of stack loop error because it seems to repeat itself
i tested it against ruby-head and there it seems the problem is fixed but not backported yet
Hanmac (Hans Mackowiak)
01:19 PM Bug #10734 (Closed): Segfault when combining default arguments with keyword arguments
Combining default arguments with a keyword argument produces a segfault when the function is called with hash that contains a string key.
See the following transcript:
~~~
natano@ketzer:~$ irb
2.2.0 :001 > def foo(data=nil, foo: :b...
natano (Martin Natano)
02:32 PM Feature #10730 (Assigned): Implement Array#bsearch_index
> Let me then tell you about my use case.
Thank you, looks good to me.
Also, I just noticed that Array#bsearch is weaker than C's BSEARCH(3). BSEARCH(3) returns the pointer to the array, so it effectively returns not only the valu...
mame (Yusuke Endoh)
01:56 PM Feature #10730: Implement Array#bsearch_index
>
> ...
Let me then tell you about my use case. There is a sparse array of dates and I want to slice out a part of it that falls within minimum and maximum date. It is then later used to retrieve same values associated with those dates...
radan (Radan Skorić)
12:46 PM Feature #10730: Implement Array#bsearch_index
> Why do we have `Array#bsearch`?
Just because matz wanted it: https://redmine.ruby-lang.org/issues/4766#note-2
Personally, I don't think `Array#bsearch` is necessarily required. `Range#bsearch` is more general and powerful. Howe...
mame (Yusuke Endoh)
09:53 AM Feature #10730: Implement Array#bsearch_index
Yusuke Endoh wrote:
> You may want to use `Range#bsearch` for the case.
> ...
Yusuke, thanks, that is a very clever approach.
But if we do that then we are just one small step away from having `Array#bsearch` based on `Range#bsearc...
radan (Radan Skorić)
08:43 AM Feature #10730: Implement Array#bsearch_index
You may want to use `Range#bsearch` for the case.
~~~ruby
i = (0...ary.size).bsearch {|i| predicate(ary[i]) }
~~~
--
Yusuke Endoh <mame@ruby-lang.org>
mame (Yusuke Endoh)
02:22 PM Revision 3e818c61 (git): * gems/bundled_gems: update test-unit to 3.0.9.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e U.Nakamura
02:09 PM Revision 14804d6b (git): * test/ruby/test_numeric.rb (TestNumeric#test_coerce): fixed wrong message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e U.Nakamura
01:53 PM Misc #10608 (Closed): OptionParser documentation improvements
hsbt (Hiroshi SHIBATA)
01:53 PM Misc #10469 (Closed): Documented return value for Array#each
hsbt (Hiroshi SHIBATA)
12:44 PM Bug #10708: In a function call, double splat of an empty hash still calls the function with an argument
@Kolja: I wasn't aware of your post on stackoverflow when I posted this bug report, but this is indeed a nice coincidence!
For context I sometime want to apply some methods from a module without including the module, so I have a functio...
Gondolin (Damien Robert)
11:02 AM Bug #10711 (Closed): Incorrect error message in coerce failed
Applied in changeset r49224.
----------
numeric.c: correct error message when coerce fails
* numeric.c (bit_coerce): use original value for error message
[ruby-core:67405] [Bug #10711]
* test/ruby/test_numeric.rb (test_coerce): check...
Anonymous
11:02 AM Bug #10732 (Closed): rdoc:ファイル中に単独の\rがあるとrdocがハングアップする
Applied in changeset r49223.
----------
rdoc/text.rb: fix infinite loop
* lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
CR. should check if substitution occurred too.
[ruby-dev:48813] [Bug #10732]
nobu (Nobuyoshi Nakada)
07:10 AM Bug #10732 (Closed): rdoc:ファイル中に単独の\rがあるとrdocがハングアップする
以下で再現できます。
~~~
echo -e '\ra\t' > dummy.txt
rdoc dummy.txt
~~~
原因は、rdoc/text.rbのexpand_tabsで、each_line が上記のダミーデータを1行扱いするのに、gsub!の正規表現にマッチせず、until line !~ /\t/ が無限ループになるためです。
(libyajl2 のインストールでri/rdocの処理が終わらないのはこれが原因)
vmi (Motonori IWAMURO)
10:13 AM Misc #10721: Failing test because of DNS server
You can use `assert_raise_with_message`.
~~~diff
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index 4d82fd7..4f5093d 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -1,5 +1,6 @@...
nobu (Nobuyoshi Nakada)
09:28 AM Misc #10721: Failing test because of DNS server
e@zzak.io wrote:
> Were you working on a similar patch?

Not really, r49175 was because I was offline completely.
Anthony's ISP is online and doing bad things, but his patch
looks good to me.

I can commit _v2 of his patch in a d...
normalperson (Eric Wong)
01:49 AM Misc #10721 (Assigned): Failing test because of DNS server
Were you working on a similar patch? zzak (zzak _)
09:56 AM Revision 34289fff (git): numeric.c: correct error message when coerce fails
* numeric.c (bit_coerce): use original value for error message
[ruby-core:67405] [Bug #10711]
* test/ruby/test_numeric.rb (test_coerce): check error message
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49224 b2dd03c8-39d4-4d8f-98...
Eric Wong
09:52 AM Bug #9555 (Feedback): Ruby 2.0.0 compilation fails to compile on cygwin. (curses.so)
Could you show ext/curses/mkmf.log and ext/curses/extconf.h files? nobu (Nobuyoshi Nakada)
09:11 AM Bug #9736 (Third Party's Issue): segmentation fault
seems an issue by therubyracer. nobu (Nobuyoshi Nakada)
09:01 AM Revision 77f31255 (git): rdoc/text.rb: fix infinite loop
* lib/rdoc/text.rb (expand_tabs): get rid of infinite loop with
CR. should check if substitution occurred too.
[ruby-dev:48813] [Bug #10732]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
08:18 AM Revision a11e2543 (git): method.h: UNDEFINED_REFINED_METHOD_P
* method.h (UNDEFINED_REFINED_METHOD_P): macro to tell if refined
original method is defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
07:46 AM Bug #10731 (Closed): Segmentation fault when create alias to refined method
Applied in changeset r49221.
----------
vm_method.c: NameError at refined method alias
* vm_method.c (rb_alias): raise a NameError when creating alias to
a refined method if the original method of the refined method is
not defined....
nobu (Nobuyoshi Nakada)
05:09 AM Bug #10731: Segmentation fault when create alias to refined method
the patch for this. hanachin (Seiei Miyagi)
05:05 AM Bug #10731 (Closed): Segmentation fault when create alias to refined method
following code cause segmentation fault, both `foo` and `bar` is not defined in refined class, in trunk and 2.2.0, 2.1.5, 2.0.0
``` ruby
class C
end
module RefinementBug
refine C do
def foo
end
def bar
en...
hanachin (Seiei Miyagi)
07:45 AM Revision 1abd51ad (git): vm_method.c: NameError at refined method alias
* vm_method.c (rb_alias): raise a NameError when creating alias to
a refined method if the original method of the refined method is
not defined. [ruby-core:67523] [Bug #10731]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49221...
nobu (Nobuyoshi Nakada)
07:08 AM Bug #9596 (Rejected): Segmentation Fault 1.9.3p545 when starting rails s
Two different libruby are used.
> ~~~
> ...
nobu (Nobuyoshi Nakada)
04:19 AM Bug #9596 (Feedback): Segmentation Fault 1.9.3p545 when starting rails s
hsbt (Hiroshi SHIBATA)
04:53 AM Feature #10323 (Closed): [PATCH] Improving doc for Math.atan2
Applied in changeset r49220.
----------
* math.c (math_atan2): improve documentation.
[Feature #10323][ruby-core:65400][ci skip]
hsbt (Hiroshi SHIBATA)
04:53 AM Revision 2f56ebe8 (git): * math.c (math_atan2): improve documentation.
[Feature #10323][ruby-core:65400][ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt (Hiroshi SHIBATA)
04:51 AM Bug #10576 (Closed): [DOC] Several fixes for the BigDecimal documentation
Applied in changeset r49219.
----------
* ext/bigdecimal/bigdecimal.c: fixes documentation like labeled lists,
code examples etc. [ruby-core:66730][Bug #10576][ci skip]
hsbt (Hiroshi SHIBATA)
04:50 AM Revision 60c580fd (git): * ext/bigdecimal/bigdecimal.c: fixes documentation like labeled lists,
code examples etc. [ruby-core:66730][Bug #10576][ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt (Hiroshi SHIBATA)
04:37 AM Revision ae0e6807 (git): * lib/optparse.rb: improvements for OptionParser documentation.
[misc #10608][ruby-core:66901][ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt (Hiroshi SHIBATA)
04:33 AM Revision 2f7e05b1 (git): * array.c (rb_ary_each): documented return value.
[misc #10469][ruby-core:66063]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt (Hiroshi SHIBATA)
04:18 AM Bug #10275 (Closed): Issues when trying to complile ruby 2.1.3
hsbt (Hiroshi SHIBATA)
01:25 AM Revision e19cf850 (git): array.c: trivial optimizations
* array.c (rb_ary_bsearch): trivial optimizations, for Fixnum, and
by keeping the last satisfied element.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)

01/11/2015

11:48 PM Revision 4d69e03b (git): array.c: class name encoding
* array.c (rb_ary_bsearch): preserve encoding of class name in an
exception message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
10:05 PM Feature #10730 (Closed): Implement Array#bsearch_index

We currently have Array#bsearch but no Array#bsearch_index and to me it seems that violates the principle of least surprise, especially when we consider the other combinations of existing methods that find either an element or it’s ind...
radan (Radan Skorić)
04:23 PM Feature #10728: Warning for Fixnum#size to use RbConfig::SIZEOF['long']
RbConfig::SIZEOF['long'] is a drop-in replacement but Fixnum::MAX is not.
Also, I feel Fixnum is a implementation detail.
akr (Akira Tanaka)
03:58 PM Revision cb95d38a (git): * 2015-01-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:58 PM Revision 57b87a00 (git): [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
03:18 PM Feature #10714: Array#reject! nonlinear performance problem
I negate the part "others don't requested", ... somebody requested it, ... perhaps. nobu (Nobuyoshi Nakada)
12:50 PM Feature #10714: Array#reject! nonlinear performance problem
I think nobu has a right to accept this feature because the documented bahavior which will be changed was implemented and committed by nobu and others don't requested.
If nobu don't think so, we need approval of matz or naruse.
akr (Akira Tanaka)
02:05 AM Feature #10714: Array#reject! nonlinear performance problem
Here are the results for `reject!` using this benchmark:
```ruby
require 'derailed_benchmarks'
require 'derailed_benchmarks/tasks'
namespace :perf do
desc "Array#reject!"
task :array_reject => [:setup] do
Benchmark.ips...
zzak (zzak _)
01:14 AM Feature #10714 (Open): Array#reject! nonlinear performance problem
zzak (zzak _)
01:14 AM Feature #10714: Array#reject! nonlinear performance problem
Ooops, there was a bug in my test, and after fixing it and updating the results above it seems that nobu's patch improves things slightly.
I'm going to post the results for both `select!` and `reject!` soon.
@Yura, you can see tha...
zzak (zzak _)
02:29 PM Feature #10729: Array method to subtract in place
The block form can be achieved with Enumerable#partition.
I agree in general splitting an array, according to some property using the order of the elements (no take_drop_while) or to some other array (this request) is more difficult t...
Eregon (Benoit Daloze)
07:37 AM Bug #10689: `unexpected break' occurs when TracePoint#binding is called
vm_throw_start内にあるflagが立っている場合の処理は
以下のように整理できるんじゃないかと思うのですがどうでしょう。
~~~diff
diff --git a/vm.c b/vm.c
index 45734e1..80b3bbe 100644
--- a/vm.c
+++ b/vm.c
@@ -1523,7 +1523,7 @@ vm_exec(rb_thread_t *th)
}
}
}
- else i...
ktsj (Kazuki Tsujimoto)
07:35 AM Revision 13e15287 (git): extmk.rb: do not exclude readline
* ext/extmk.rb: do not exclude readline by default on win32. it
would not be completely impossible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
06:11 AM Revision 7c4d749d (git): test_utils.rb: dynamically chosen port number
* test/webrick/test_utils.rb (test_create_listeners): use
dynamically chosen port number, not hardcoded port number.
[ruby-core:67508]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
04:44 AM Revision ae752cc5 (git): extmk.rb: default without-ext
* ext/extmk.rb: move the default execluded extensions from
configure.in so that it works on win32 too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:54 AM Revision d201761d (git): * 2015-01-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:54 AM Revision 24b6863f (git): fiddle: check assembler
* ext/fiddle/extconf.rb: requires assembler for src/win{32,64}.S.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:54 AM Revision 463856a7 (git): fiddle: fix for old VC
* ext/fiddle/win32/libffi-3.2.1-mswin.patch (include/ffi.h.in):
old version VCs did not support long long, use __int64 instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:30 AM Bug #8720 (Open): ECB mode seems to be broken
I think we could do better to warn users when doing things out of order.
In this case we have a stateful thing, which should know whether key is set. In the case it's not yet, we should raise. This could be considered behavior change,...
zzak (zzak _)

01/10/2015

10:36 PM Feature #10729 (Open): Array method to subtract in place
I request a method on array that takes another array, subtract that from self in place (= destructively), and return the subtracted elements:
a = [1, 2, 3, 4, 5]
a.some_method([2, 4, 6]) #=> [2, 4]
a #=> [1, 3, 5]
Ide...
sawa (Tsuyoshi Sawada)
06:56 PM Feature #10714: Array#reject! nonlinear performance problem
Zachary, patch fixes `reject!` and you test `select!`, ie patch fixes case when most items were deleted, and you test case when no item is deleted.
Based on numbers you present, patched version is so close to unpatched so I could not ...
funny_falcon (Yura Sokolov)
06:40 PM Feature #10714: Array#reject! nonlinear performance problem
Using the following benchmark I compared nobu's patch vs. 2.2:
```ruby
require 'derailed_benchmarks'
require 'derailed_benchmarks/tasks'
namespace :perf do
desc "Array#select! and friends"
task :array_select => [:setup] do
...
zzak (zzak _)
02:22 PM Feature #10714: Array#reject! nonlinear performance problem
https://github.com/nobu/ruby/compare/Feature%2310714-Array-linear-performance nobu (Nobuyoshi Nakada)
09:36 AM Feature #10714: Array#reject! nonlinear performance problem
Now, I think this issue is a feature instead of a bug because it changes a documented behavior. akr (Akira Tanaka)
08:44 AM Feature #10714: Array#reject! nonlinear performance problem
Akira Tanaka wrote:
> So the problem is which is important between the linear performance and the observability.
> ...
I fully agree. Nonlinear performance is a killer. Observability and ability to break are just nice-to-have. I thin...
duerst (Martin Dürst)
08:39 AM Feature #10714: Array#reject! nonlinear performance problem
It seems that several people found this problem.
- http://qiita.com/Nabetani/items/623df6f738864b5ed005
- https://twitter.com/grafi_tt/status/263097832158924800
- http://d.hatena.ne.jp/plonk123/20140603/1401832299
akr (Akira Tanaka)
07:22 AM Feature #10714: Array#reject! nonlinear performance problem
> Ok, then try if something dies?
I think we should try.
We can explain the reason of this change.
It may be a good idea to describe this issue in NEWS because a documented behavior changed, though.
akr (Akira Tanaka)
06:47 AM Feature #10714: Array#reject! nonlinear performance problem
Forgot a patch of the tests
~~~diff
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 31f33dd..33fc5d6 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -661,7 +661,7 @@ class TestArray < Te...
nobu (Nobuyoshi Nakada)
06:45 AM Feature #10714: Array#reject! nonlinear performance problem
Ok, then try if something dies?
~~~diff
diff --git a/array.c b/array.c
index 0de7231..f2f7352 100644
--- a/array.c
+++ b/array.c
@@ -2824,6 +2824,48 @@ rb_ary_select(VALUE ary)
return result;
}

+struct select_bang_arg...
nobu (Nobuyoshi Nakada)
04:30 AM Feature #10714: Array#reject! nonlinear performance problem
Hm.
The failed test is introduced by you after [Bug #5752].
The bug report describes as "If this is indeed the intended behaviour, ...".
It means that the reporter is not sure that the current behavior is intended or not.
Why cur...
akr (Akira Tanaka)
04:04 AM Feature #10714: Array#reject! nonlinear performance problem
I know, and `make test-all` failed. nobu (Nobuyoshi Nakada)
03:51 AM Feature #10714: Array#reject! nonlinear performance problem
I don't think the modification must be observable from the given block.
[Bug #2545] doesn't discuss the observability in the block.
It discusses the receiver after "break".
If the modification is not required to be observable from...
akr (Akira Tanaka)
12:48 AM Feature #10714 (Rejected): Array#reject! nonlinear performance problem
The target of `Array#reject!` is the receiver itself, so the modification can be observed from the given block, or the block can exit by `break`.
Therefore the compaction is necessary each times.
I can't think of the way to avoid it,...
nobu (Nobuyoshi Nakada)
01:47 PM Bug #10722: Array#keep_if is borked if user calls 'break'
Apart from the performance problem, I feel following exmaple should show [7,8].
```
a = [5,6,7,8,9,10]; a.keep_if { |x| break if x > 8; x >= 7 }; p a
```
Because the method name is "keep_if", the method should keep only elements...
akr (Akira Tanaka)
04:08 AM Bug #10722: Array#keep_if is borked if user calls 'break'
r49196 causes nonlinear performance problem.
```
% ./ruby -v -e '
20.times {|i|
a = [nil]*i*10000;
t1 = Time.now
a.keep_if { false }
t2 = Time.now
t = t2 - t1
p ["*" * (t * 20).to_i , t]
}
'
ruby 2.3.0dev (2015-...
akr (Akira Tanaka)
01:12 AM Bug #10722 (Closed): Array#keep_if is borked if user calls 'break'
Applied in changeset r49196.
----------
array.c: keep consistency
* array.c (rb_ary_select_bang): keep the array consistent by
removing unselected values soon. [ruby-dev:48805] [Bug #10722]
nobu (Nobuyoshi Nakada)
01:03 PM Feature #10728: Warning for Fixnum#size to use RbConfig::SIZEOF['long']
I took a look at `fixnum-size-search.txt` and using `RbConfig::SIZEOF['long']` instead usually isn't the correct replacement. In many lines the size of `long` in bytes isn't of interest, the min- and maximum value of a fixnum is (see fea... cremno (cremno phobia)
11:42 AM Feature #10728 (Open): Warning for Fixnum#size to use RbConfig::SIZEOF['long']
How about add a warning for Fixnum#size ?
```
% ./ruby -e 'p 0.size'
-e:1: warning: Use RbConfig::SIZEOF['long'] instead of Fixnum#size
8
```
Currently it returns sizeof(long) which is 4 or 8.
However it is implementation de...
akr (Akira Tanaka)
12:24 PM Revision 7dddd592 (git): test/unit.rb: --excludes-dir list
* test/lib/test/unit.rb (ExcludesOption): allow directory list by
PATH_SEPARATOR to --excludes-dir option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
11:40 AM Revision 04196d1f (git): Use bit_length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
10:29 AM Bug #10470: TracePoint cannot trace attr_accessor/reader/writer method
添付したパッチと同じ様にEXEC_EVENT_HOOKを追加して性能測定をしてみました。
測定にはbenchmark-ipsというgemを使って、100msでの実行命令数を計測しています。
測定に使ったソースコードは以下の通りです。
~~~ruby
require 'benchmark/ips'
class Foo
attr_accessor :hoge
def bar
@bar
end
def initial...
joker1007 (Tomohiro Hashidate)
07:15 AM Revision 8ed8e0ba (git): test_etc.rb: relax comparisons
* test/etc/test_etc.rb (test_getgrgid, test_getgrnam): relax
comparisons. getgrent() does not return mem properly in some
circumstances (possibly, involved in Open Directory on OSX).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trun...
nobu (Nobuyoshi Nakada)
04:33 AM Bug #10727: Segfault with newlines + multibyte characters in exception message
Thanks! eagletmt (Kohei Suzuki)
03:35 AM Bug #10727 (Closed): Segfault with newlines + multibyte characters in exception message
Applied in changeset r49201.
----------
* eval_error.c (error_print): pos and len parameters of rb_str_substr()
are counted by characters, not bytes. use rb_str_subseq() instead.
[Bug #10727] [ruby-core:67473]
usa (Usaku NAKAMURA)
01:46 AM Bug #10727 (Assigned): Segfault with newlines + multibyte characters in exception message
I can reproduce this.
```shell
% ruby -v issue10727.rb
issue10727.rb:7:in `<main>': にほんご (E)
issue10727.rb: [BUG] Segmentation fault at 0x00000000000008
ruby 2.3.0dev (2015-01-09 trunk 49195) [x86_64-darwin13]
```
hsbt (Hiroshi SHIBATA)
01:41 AM Bug #10727 (Closed): Segfault with newlines + multibyte characters in exception message
In Ruby 2.2.0, this simple Ruby script results in segfault.
```ruby
class E < StandardError
def initialize
super("にほんご\n改行")
end
end
raise E
```
It's caused by r48637.
eagletmt (Kohei Suzuki)
04:02 AM Revision 54f1d71a (git): test for [ruby-core:67473] [Bug #10727]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
03:57 AM Bug #10668 (Closed): Fix description for Zlib.crc32
Applied in changeset r49202.
----------
* ext/zlib/zlib.c: fix document of method signatures.
[Bug #10668][ruby-core:67186][ci skip]
hsbt (Hiroshi SHIBATA)
03:57 AM Revision 6d92166c (git): * ext/zlib/zlib.c: fix document of method signatures.
[Bug #10668][ruby-core:67186][ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt (Hiroshi SHIBATA)
03:35 AM Revision 27c679b8 (git): * eval_error.c (error_print): pos and len parameters of rb_str_substr()
are counted by characters, not bytes. use rb_str_subseq() instead.
[Bug #10727] [ruby-core:67473]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
U.Nakamura
02:20 AM Revision 0704c382 (git): ChangeLog: adjust indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
01:58 AM Revision 84746126 (git): * complex.c: removed commented-out code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e hsbt (Hiroshi SHIBATA)
01:57 AM Feature #10376 (Closed): [PATCH 2/2] Remove comment-out about Nuby's method
Applied in changeset r49198.
----------
* rational.c: removed commented-out code.
[Feature #10376][ruby-core:65643]
hsbt (Hiroshi SHIBATA)
01:57 AM Revision 82c55fce (git): * rational.c: removed commented-out code.
[Feature #10376][ruby-core:65643]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt (Hiroshi SHIBATA)
01:52 AM Bug #10479 (Feedback): OpenSSL not upgrading to 1.0.1j while recompiling Ruby.
hsbt (Hiroshi SHIBATA)
01:35 AM Bug #9559 (Closed): build failure with clang 3.4
DL has been removed from Ruby 2.2.0 or later.
but I think we need to backport this issue into Ruby 2.1 and 2.0.0
https://github.com/freebsd/freebsd-ports/blob/master/lang/ruby19/files/patch-ext__dl__extconf.rb
hsbt (Hiroshi SHIBATA)
01:22 AM Feature #10726 (Open): [PATCH 4/4] * New methods: Set#power
Hi, there.
Here are 4 patches.
```
implement_set#power.patch ... Implement Set#power
update_test_set.rb.patch ... Add tests for Set#power
update_NEWS.patch ... Update NEWS for Set#power
fix_indent_NEWS.patch ... Ad...
gogotanaka (Kazuki Tanaka)
01:22 AM Bug #10725 (Feedback): Segfault with ObjectSpace::trace_object_allocations_start
We don't have the same environment equals to yours, we can't address where it happens without the debugging information.
And, as you use some extension libraries, especially ffi, it might be impossible to fix by us.
nobu (Nobuyoshi Nakada)
12:11 AM Bug #10725 (Closed): Segfault with ObjectSpace::trace_object_allocations_start

While trying to pin down a memory leak issue I enabled trace_object_allocations_start but after a while my application (a daemon, not rails) crashes. I attached the output.
vihai (Daniele Orlandi)
01:12 AM Revision 9f7179c5 (git): * 2015-01-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
01:12 AM Revision d2da3d04 (git): array.c: keep consistency
* array.c (rb_ary_select_bang): keep the array consistent by
removing unselected values soon. [ruby-dev:48805] [Bug #10722]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
12:33 AM Misc #10721: Failing test because of DNS server
Improved the original solution by adding assert_raises. anthonycrumley (Anthony Crumley)

01/09/2015

02:20 PM Revision 07b87cd2 (git): * lib/rubygems: Update to RubyGems HEAD(e53c54a).
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt (Hiroshi SHIBATA)
10:43 AM Bug #10724 (Closed): [TracePointAPI] Missing return event from initialize method when using `domain_name` gem
The domain_name gem defines a DomainName object which has a pretty complex `initialize` method. The TracePoint API misses the return event from this method when instantiating a DomainName object.
I attach a failing test case.
Thanks!!
deivid (David Rodríguez)
09:41 AM Bug #10710: can't compile ruby 2.2.0 with gcc versions older than 4.4.0
here's the build output:
~~~
~/src/ruby-2.2.0 $ make
CC = gcc
LD = ld
LDSHARED = gcc -shared
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initialize...
drkaes (Stefan Kaes)
09:38 AM Bug #10710: can't compile ruby 2.2.0 with gcc versions older than 4.4.0
the problem is that the compiler accepts the warning flag but fails to compile a piece of code as soon as it tries to emit some warning.
~~~
configure:7495: checking whether -Wno-packed-bitfield-compat is accepted as CFLAGS
configur...
drkaes (Stefan Kaes)
01:34 AM Bug #10710 (Feedback): can't compile ruby 2.2.0 with gcc versions older than 4.4.0
Could you show your config.log file, around checking `-Wno-packed-bitfield-compat`? nobu (Nobuyoshi Nakada)
09:40 AM Bug #10723: [PERF] bm_tread_create_join 20% slower
Opps it should bm_vm_thread_create_join.rb tgxworld (Guo Xiang Tan)
09:38 AM Bug #10723 (Closed): [PERF] bm_tread_create_join 20% slower
Relevant commits: https://github.com/ruby/ruby/compare/39fd4a8...5697b2f
Chart showing the regression: http://rubybench.org/ruby/ruby/commits?result_type=vm_thread_create_join
For those unable to view the chart, the benchmark resul...
tgxworld (Guo Xiang Tan)
08:52 AM Bug #10722 (Closed): Array#keep_if is borked if user calls 'break'
ref. [Bug #2545]
```
$ ruby -e 'a = [5,6,7,8,9,10]; a.keep_if { |x| break if x > 8; x >= 7 }; p a'
[7, 8, 7, 8, 9, 10]
$ ruby -e 'a = [5,6,7,8,9,10]; a.delete_if { |x| break if x > 8; x < 7 }; p a'
[7, 8, 9, 10]
```
I was expe...
wanabe (_ wanabe)
08:03 AM Bug #10708 (Assigned): In a function call, double splat of an empty hash still calls the function with an argument
Although `*args` includes and passes keywords too, but seems you want to add/remove/change some of keyword arguments.
It sounds reasonable to me.
nobu (Nobuyoshi Nakada)
12:57 AM Bug #10708: In a function call, double splat of an empty hash still calls the function with an argument
If I am not mistaken, even latest Ruby 2.2 selects keyword arguments as the last method's argument and of Hash type.
Let's imagine an example where both simple and keyword optional arguments are used:
~~~ruby
def call_multiargs(me...
dunric (David Unric)
07:51 AM Bug #10716: Erroneous semicolon after AC_CASE
Nobuyoshi Nakada wrote:
> Vit Ondruch wrote:
> ...
Ok, that makes sense. So I'll happily change the AC_PREREQ back to 2.63 for RHEL 6/CentOS 6 packages. Thanks for applying the patch.
vo.x (Vit Ondruch)
01:57 AM Bug #10716 (Closed): Erroneous semicolon after AC_CASE
Applied in changeset r49192.
----------
configure.in: Remove superfluous semicolon
* configure.in (RUBY_SETJMP_TYPE): Remove superfluous semicolon
which causes a syntax error with autoconf 2.63.
[ruby-core:67429] [Bug #10716]
nobu (Nobuyoshi Nakada)
01:50 AM Bug #10716: Erroneous semicolon after AC_CASE
Vit Ondruch wrote:
> BTW I am wondering why Ruby actually enforces autoconf 2.67 and makes plenty of RHEL 6/CentOS 6 users [1] unnecessary issues, when it builds with 2.63 just fine. If there was some justification at least [2].
Beca...
nobu (Nobuyoshi Nakada)
06:30 AM Misc #10721 (Closed): Failing test because of DNS server
The following test is failing:
[ 5/52] TestNetHTTP#test_failure_message_includes_failed_domain_and_port = 0.32 s
1) Failure:
TestNetHTTP#test_failure_message_includes_failed_domain_and_port [/vagrant/test/net/http/test_http.rb:196...
anthonycrumley (Anthony Crumley)
04:03 AM Revision 30253e6a (git): fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
03:30 AM Feature #10718: IO#close should not raise IOError on closed IO objects.
I don't expect immediate stdlib update. akr (Akira Tanaka)
03:08 AM Feature #10718: IO#close should not raise IOError on closed IO objects.
I think the API is improved but I'm not sure we need to find & replace
every occurrence in the stdlib
zzak (zzak _)
02:18 AM Feature #10718: IO#close should not raise IOError on closed IO objects.
Thank you for proposing this. I think this will simplify working with
Ruby IO and make me happier since I work with a lot of IO-related code.
Outside of test cases, I don't forsee compatibility problems either.
normalperson (Eric Wong)
01:53 AM Feature #10718 (Closed): IO#close should not raise IOError on closed IO objects.
I'd like to change IO#close.
It should not raise IOError on closed IO objects.
We sometimes invoke IO#close only when the IO object is not closed as:
```
f.close if !f.closed?
```
If this issue is accepted, we can write it si...
akr (Akira Tanaka)
02:23 AM Feature #10720 (Rejected): A proposal for something like: attr_reader :foo? - with the trailing '?' question mark
Hi guys,
Sorry to burden you with another suggestion, no problem
if it is not accepted, I wanted to just make it. :-)
We have a way to define reader methods easily, such
as in:
attr_reader :foo
This should be equivalen...
shevegen (Robert A. Heiler)
02:13 AM Bug #10719 (Closed): empty splatting literal hash after other keywords causes SEGV
Applied in changeset r49193.
----------
parse.y: eliminate empty hashes
* parse.y (assocs, assoc): eliminate splatting empty literal
hashes. [ruby-core:67446] [Bug #10719]
* compile.c (compile_array_): supprt splatted hash in hash t...
nobu (Nobuyoshi Nakada)
02:01 AM Bug #10719 (Closed): empty splatting literal hash after other keywords causes SEGV
~~~
$ ruby -e 'foo(a: 1, **{})'
ruby: [BUG] Segmentation fault at 0x00000000000018
ruby 2.3.0dev (2015-01-09 trunk 49192) [universal.x86_64-darwin14]
~~~
nobu (Nobuyoshi Nakada)
02:13 AM Revision 17a65c32 (git): parse.y: eliminate empty hashes
* parse.y (assocs, assoc): eliminate splatting empty literal
hashes. [ruby-core:67446] [Bug #10719]
* compile.c (compile_array_): supprt splatted hash in hash type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49193 b2dd03c8-39d...
nobu (Nobuyoshi Nakada)
01:57 AM Revision 787af09e (git): configure.in: Remove superfluous semicolon
* configure.in (RUBY_SETJMP_TYPE): Remove superfluous semicolon
which causes a syntax error with autoconf 2.63.
[ruby-core:67429] [Bug #10716]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
01:56 AM Revision c9b16557 (git): ChangeLog: adjust indent
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
01:29 AM Bug #10717 (Third Party's Issue): TestGemExtCmakeBuilder#test_self_build fails on RHEL 6/CentOS 6
nobu (Nobuyoshi Nakada)

01/08/2015

10:25 PM Revision 344b8bbd (git): * ext/psych/lib/psych/visitors/yaml_tree.rb: correctly quote non-ascii
letters. Thanks @jirutka for the patch.
* test/psych/test_string.rb: test for change
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tenderlovemaking (Aaron Patterson)
10:15 PM Revision 5dabead1 (git): * ext/psych/lib/psych/visitors/to_ruby.rb: call `allocate` on hash
subclasses. Fixes github.com/tenderlove/psych/issues/196
* test/psych/test_hash.rb: test for change
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tenderlovemaking (Aaron Patterson)
10:00 PM Revision 8c08c829 (git): * ext/psych/lib/psych/visitors/to_ruby.rb: revive hashes with ivars
* ext/psych/lib/psych/visitors/yaml_tree.rb: dump hashes with ivars.
Fixes github.com/psych/issues/43
* test/psych/test_hash.rb: test for change
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49188 b2dd03c8-39d4-4d8f-98ff-823fe69b...
tenderlovemaking (Aaron Patterson)
09:11 PM Bug #10708: In a function call, double splat of an empty hash still calls the function with an argument
Just to inform everyone, this issue stems from [this post on Stack Overflow](http://stackoverflow.com/questions/27821422/how-can-i-collapse-double-splat-arguments-into-nothing).
Also, I have now idea how the ruby parser works, so if i...
kkube (Kolja Kube)
08:21 PM Bug #10708: In a function call, double splat of an empty hash still calls the function with an argument
By my subjective opinion I don't find this a bug but a feature.
> Consider this:
> ...
Here you define a method without a (keyword) argument placeholder so it does not expect a Hash argument, which is effectively used to pass keyword...
dunric (David Unric)
07:50 PM Bug #10710: can't compile ruby 2.2.0 with gcc versions older than 4.4.0
no. it aborts the build. drkaes (Stefan Kaes)
07:31 PM Bug #10689: `unexpected break' occurs when TracePoint#binding is called
ありがとうございます!
頂いたパッチを元に、cfp を使うように整理してみました。
http://www.atdot.net/sp/view/e5ivhn
* vm_throw() を簡素化
* マクロっぽい名前を関数っぽく
一応、test-all/test-rubyspec は通っていますが、良さそうでしたらコミットしてもらえないでしょうか。
ko1 (Koichi Sasada)
03:58 PM Bug #10697: WIN32OLE: WIN32OLE_RECORD を使用したスクリプト終了時にruby.exe がクラッシュすることがある
ありがとうございます。
現象自体は確認しており、メモリーの二重開放まではわかっていたのですが、
COMサーバ側で開放しているとは思いませんでした。
ちょっと時間が取れてなくてパッチの方は詳しく見ていないのですが、別のアプローチの
VT_BYREF|VT_RECORDで渡したら、こちらでも現象は起こらなくなったみたいです。
わざわざ、VT_VARIANT | VT_BYREF で渡しているのは参照渡しにしたいからなので、
参照渡しをするのなら、VT_RECOR...
suke (Masaki Suketa)
03:38 PM Revision 2b2f9b75 (git): * 2015-01-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:38 PM Revision 45913acc (git): Add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
03:07 PM Bug #10717 (Closed): TestGemExtCmakeBuilder#test_self_build fails on RHEL 6/CentOS 6
~~~
$ rpm -q cmake
cmake-2.6.4-5.el6.x86_64
$ make test-all TESTS=-n\ TestGemExtCmakeBuilder#test_self_build
<snip>
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems "./test/runner.rb" --...
vo.x (Vit Ondruch)
02:02 PM Bug #10699: m(*a, **b) doesn't recognize integer options.
Thank you akr san for your consideration about backports.
I'll fill Backport field with 2.1: REQUIRED only for r49173.
nagachika (Tomoyuki Chikanaga)
02:02 PM Bug #10716: Erroneous semicolon after AC_CASE
Forgot to mention the actual error:
~~~
$ autoconf
$ ./configure
./configure: line 63225: syntax error near unexpected token `;'
./configure: line 63225: `; }; then'
~~~
vo.x (Vit Ondruch)
01:34 PM Bug #10716 (Closed): Erroneous semicolon after AC_CASE
This is issue when building with autoconf 2.63 available in RHEL6/CentOS6
BTW I am wondering why Ruby actually enforces autoconf 2.67 and makes plenty of RHEL 6/CentOS 6 users [1] unnecessary issues, when it builds with 2.63 just fine...
vo.x (Vit Ondruch)
01:36 PM Feature #5458 (Closed): DL should be removed
DL has been removed at Ruby 2.2.0 hsbt (Hiroshi SHIBATA)
09:50 AM Revision 6ebb19c8 (git): fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e znz (Kazuhiro NISHIYAMA)
09:37 AM Bug #10715 (Closed): WEBrick::HTTPResponse#to_s calls send_response(), and make debugging quite difficult.
WEBrick::HTTPResponse#to_s calls send_response(), and this makes debugging very difficult.
If I run webrick on debugger or just do "print" debug, and show status of the object in some point,
then debugger or "print" may calls "to_s" an...
yoshiokatsuneo (Tsuneo Yoshioka)
08:55 AM Feature #10714: Array#reject! nonlinear performance problem
According to `git bisect`, it caused by r32373 (related to [Bug #2545]) . wanabe (_ wanabe)
02:24 AM Feature #10714 (Closed): Array#reject! nonlinear performance problem
I found Array#reject! is too slow.
I measured it and it seems the performance is nonlinear.
```
% ./ruby -v -e '
20.times {|i|
a = [nil]*i*10000;
t1 = Time.now
a.reject! { true }
t2 = Time.now
t = t2 - t1
p ["*"...
akr (Akira Tanaka)
08:05 AM Bug #10707 (Closed): Segmentation fault when get refined new method in BasicObject
Applied in changeset r49184.
----------
vm_method.c: no super klass, no original method entry
* vm_method.c (rb_method_entry): if no super class, no original
method entry. [ruby-core:67389] [Bug #10707]
nobu (Nobuyoshi Nakada)
08:05 AM Revision 3f8ceab9 (git): vm_method.c: no super klass, no original method entry
* vm_method.c (rb_method_entry): if no super class, no original
method entry. [ruby-core:67389] [Bug #10707]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
07:45 AM Bug #10706 (Closed): Segmentation fault when change visibility of refined new method
Applied in changeset r49183.
----------
ref of r49182 [Bug #10706]
nobu (Nobuyoshi Nakada)
07:44 AM Revision d763d45d (git): ref of r49182 [Bug #10706]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
07:31 AM Revision 45989416 (git): vm_method.c: fix change refined new method visibility
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
07:21 AM Feature #10701: Class:Array 2 New methods
i also would like if there are block variants of them like that
data = 0..10
data.prev_value {|o| o == 5} #=> 4
data.next_value {|o| o == 5} #=> 6
and i would use prev_value and next value instead of prev and next because it coll...
Hanmac (Hans Mackowiak)
07:07 AM Revision 759a31b4 (git): Revert GH-808
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
06:31 AM Revision a8565ad2 (git): * test/ruby/test_symbol.rb (TestSymbol#test_symbol_fstr_leak): get rid of a
false positive on mswin CI.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
U.Nakamura
06:26 AM Revision 93425341 (git): * test/test_open3.rb (TestOpen3#test_numeric_file_descriptors): passing FDs
bigger than 2 is not supported on Windows.
fixed test failure introcuded at r49173.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
U.Nakamura
04:42 AM Bug #10713: Assigning default value for a Hash as an empty Array creating unpredictable results
Arvinder Singh wrote:
> ~~~
> ...
The `letters[:a]` part of the second line returns the "default value" of the Hash because the `:a` key does not exist in the Hash. The `<< 1` part pushes a `1` onto the end of the default value, but i...
david_macmahon (David MacMahon)
01:38 AM Bug #10713: Assigning default value for a Hash as an empty Array creating unpredictable results
It's quite expected because the default array is created exactly once:

letters = Hash.new([])
letters.default.object_id # => 70310393550400
letters[:a].object_id # => 70310393550400
letters[:b].object_id # => 70310393550400

The...
austin (Austin Ziegler)
01:33 AM Bug #10713: Assigning default value for a Hash as an empty Array creating unpredictable results
Martin Dürst wrote:
> Hiroshi SHIBATA wrote:
> ...
I would agree that this is surprising behaviour. It would appear that in this case, the append operator is not re-assigning the value, the way it does any other time it is used. And it...
donburks (Don Burks)
01:16 AM Bug #10713: Assigning default value for a Hash as an empty Array creating unpredictable results
Hiroshi SHIBATA wrote:
> It's expected behavior
Hiroshi, can you tell us why it's expected behavior? It looks quite surprising.
duerst (Martin Dürst)
12:02 AM Bug #10713 (Rejected): Assigning default value for a Hash as an empty Array creating unpredictable results
It's expected behavior hsbt (Hiroshi SHIBATA)
03:53 AM Bug #10700 (Closed): On case-sensitive filesystem on OS X, Dir.glob("*.TXT") matches case-insensitively
Applied in changeset r49178.
----------
dir.c: OSX case-folding
* dir.c (glob_helper): match in case-folding only if the directory
resides on a case-insensitve file system, on OSX.
[ruby-core:67364] [Bug #10700]
nobu (Nobuyoshi Nakada)
03:10 AM Bug #10700: On case-sensitive filesystem on OS X, Dir.glob("*.TXT") matches case-insensitively
Nobuyoshi Nakada wrote:
> Can you try https://github.com/nobu/ruby/compare/Bug%2310700-OSX-case-folding ?
Confirmed that it works.
~~~
$ touch foo.txt foo.TXT FOO.txt FOO.TXT
$ ls -l foo* FOO* ...
hasari (Hiro Asari)
03:53 AM Revision d6aa766a (git): dir.c: OSX case-folding
* dir.c (glob_helper): match in case-folding only if the directory
resides on a case-insensitve file system, on OSX.
[ruby-core:67364] [Bug #10700]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49178 b2dd03c8-39d4-4d8f-98ff-823f...
nobu (Nobuyoshi Nakada)
03:52 AM Revision e247d9e1 (git): open3.rb: Hash.try_convert
* lib/open3.rb (popen_run): use Hash.try_convert for duck typing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
02:39 AM Revision c4675d86 (git): * .travis.yml: Remove redundant configuration option.
[fix GH-809] Patch by @gxworld
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hsbt (Hiroshi SHIBATA)
02:31 AM Feature #10119 (Feedback): [PATCH] [net/imap] Add CHANGEDSINCE FETCH modifier + complementary add MODSEQ Message Data Item in FETCH Command
It seems to be a bug that store_internal is changed not to use flags.
What was your intention?
Could you write tests for this change?
shugo (Shugo Maeda)

01/07/2015

11:59 PM Bug #10713 (Rejected): Assigning default value for a Hash as an empty Array creating unpredictable results
Creating a Hash with a default value works fine, unless the default value is an empty Array.
E.g. the following returns an empty Hash...
~~~
irb(main):001:0> letters = Hash.new([])
=> {}
irb(main):002:0> letters[:a] << 1
=> [1]...
punjab (Arvinder Singh)
10:19 PM Bug #10712 (Closed): [PATCH] lib/resolv.rb: consider ENETUNREACH as ResolvTimeout
Applied in changeset r49175.
----------
lib/resolv.rb: consider ENETUNREACH as ResolvTimeout
This allows "gem install /path/to/local.gem" to be successful
on a machine without a network connection.
[ruby-core:67411] [Bug #10712]
Anonymous
10:09 PM Bug #10712: [PATCH] lib/resolv.rb: consider ENETUNREACH as ResolvTimeout
Please commit. akr (Akira Tanaka)
09:59 PM Bug #10712 (Closed): [PATCH] lib/resolv.rb: consider ENETUNREACH as ResolvTimeout
This allows "gem install /path/to/local.gem" to be successful
on a machine without a network connection.
I'm fairly sure this should be fixed in lib/resolv.rb instead
of inside RubyGems (and everything else which relies on rescuing
...
normalperson (Eric Wong)
10:19 PM Revision 89ba1514 (git): lib/resolv.rb: consider ENETUNREACH as ResolvTimeout
This allows "gem install /path/to/local.gem" to be successful
on a machine without a network connection.
[ruby-core:67411] [Bug #10712]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Eric Wong
09:48 PM Bug #10711: Incorrect error message in coerce failed
do_coerce modifies x, so stashing the original before seems to fix
the problem. Maybe I missed something else. Lightly-tested patch:

--- a/numeric.c
+++ b/numeric.c
@@ -3426,10 +3426,11 @@ static int
bit_coerce(VALUE *x, VALUE...
normalperson (Eric Wong)
09:22 PM Bug #10711 (Closed): Incorrect error message in coerce failed
~~~
$ ruby -v -e '1 & 1.2'
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
-e:1: warning: possibly useless use of & in void context
-e:1:in `&': 1.2 can't be coerced into Float (TypeError)
from -e:1:in `<main>'
~~~
I...
chrisseaton (Chris Seaton)
09:38 PM Bug #10710: can't compile ruby 2.2.0 with gcc versions older than 4.4.0
> The compilation of a given source file fails as soon as the compiler
> needs to emit some warning:

Right, but ./configure detects that failure, disables the
-Wno-packed-bitfield-compat switch, and the rest of the build continues
...
normalperson (Eric Wong)
09:21 PM Bug #10710: can't compile ruby 2.2.0 with gcc versions older than 4.4.0
~~~
$ gcc --version
gcc (Debian 4.3.2-1.1) 4.3.2
~~~
The compilation of a given source file fails as soon as the compiler needs to emit some warning:
~~~
gcc -Wno-packed-bitfield-compat some_warning.c
some_warning.c: In functi...
drkaes (Stefan Kaes)
07:28 PM Bug #10710: can't compile ruby 2.2.0 with gcc versions older than 4.4.0
stkaes@googlemail.com wrote:
> compilation stops because gcc before 4.4.0 does not support the flag
> ...
I'm curious what error you saw. An ancient CentOS 5.4 x86-64 machine
managed to build it using: gcc (GCC) 4.1.2 20080704 (Red H...
normalperson (Eric Wong)
06:50 PM Bug #10710 (Closed): can't compile ruby 2.2.0 with gcc versions older than 4.4.0
compilation stops because gcc before 4.4.0 does not support the flag -Wno-packed-bitfield-compat.
patch can be found here: https://github.com/skaes/rvm-patchsets/blob/master/patches/ruby/2.2.0/railsexpress/05-fix-packed-bitfield-compa...
drkaes (Stefan Kaes)
09:09 PM Bug #10708: In a function call, double splat of an empty hash still calls the function with an argument
I think I got bitten by markdown's syntax actually, all my * * got replaced, so s/others/**others/g Gondolin (Damien Robert)
09:07 PM Bug #10708: In a function call, double splat of an empty hash still calls the function with an argument
Tsuyoshi Sawada wrote:
> Do you mean `**others`?
Yes, sorry for the typo
Gondolin (Damien Robert)
08:43 PM Bug #10708: In a function call, double splat of an empty hash still calls the function with an argument
Do you mean `**others`? sawa (Tsuyoshi Sawada)
03:49 PM Bug #10708 (Closed): In a function call, double splat of an empty hash still calls the function with an argument
Consider this:
~~~ruby
def foo; end
foo(*[]) #Splatting an empty list is ok
foo(**{}) #Double splatting an empty hash is like calling foo({}) which gives an error
~~~
This is annoying in a function that is a wrapper around anot...
Gondolin (Damien Robert)
04:31 PM Bug #10709 (Rejected): Crash while loading
I am stuck trying to upgrade my Ruby mri install
In 2.1.3 everything works fine, but with 2.1.5 and 2.2.0 it crashes while loading
I did a fresh bundle install and also made sure my gem system was up to date (gem update --system)
sfrank (Francisco Garcia)
04:29 PM Bug #10588: Invalid Dates
Patch to the above bug :
~~~
class SmartTime < Time
def self.mktime year, month, day
case month
when 4, 6, 9, 11
if day == 31
raise ArgumentError, 'argument out of range _ APR, JUNE, SEP, NOV', caller
...
NorthernLights (Imran "")
03:39 PM Bug #10699 (Feedback): m(*a, **b) doesn't recognize integer options.
I didn't know this keyword arguments behavior.
Hm. I'm not sure the current behavior is good or not.
Anyway open3 has the problem since Ruby 2.1 and I don't expect Ruby 2.1 changes the keyword arguments behavior.
So I committed r...
akr (Akira Tanaka)
03:29 PM Bug #10699 (Closed): m(*a, **b) doesn't recognize integer options.
Applied in changeset r49173.
----------
* lib/open3.rb: Open3 properly passes non-keyword hash args to spawn.
Fixed by Josh Cheek. [Fix GH-808]
Related to [ruby-core:67347] [Bug #10699]
akr (Akira Tanaka)
03:29 PM Revision 1b2276af (git): * 2015-01-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
03:29 PM Revision 1ade9cad (git): * lib/open3.rb: Open3 properly passes non-keyword hash args to spawn.
Fixed by Josh Cheek. [Fix GH-808]
Related to [ruby-core:67347] [Bug #10699]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
02:28 PM Bug #10702: Constant look up inconsistency with constants defined in included modules
Jack Nagel wrote:
> `D` does not inherit from `C` or `A`, so it does not have access to `B`.
> ...
I looked at that blog before I posted and if constant lookup worked like it says then what I am doing would work because D is nested in ...
kwstannard (Kelly Stannard)
09:59 AM Bug #10702 (Rejected): Constant look up inconsistency with constants defined in included modules
nobu (Nobuyoshi Nakada)
04:59 AM Bug #10702: Constant look up inconsistency with constants defined in included modules
`D` does not inherit from `C` or `A`, so it does not have access to `B`.
After assigning `B = B`, `E` can "see" `B` lexically.
However, if you reopen `E` as `C::E`, it will "lose" `B`:
```ruby
class C::E
B # => uninitialized...
Anonymous
03:09 AM Bug #10702 (Rejected): Constant look up inconsistency with constants defined in included modules
https://gist.github.com/kwstannard/c0f722976ba023cc5755
```ruby
module A
module B
end
end
module C
include A
puts B.inspect # => A::B
class D
puts B.inspect rescue puts 'failed' # => failed
end
B =...
kwstannard (Kelly Stannard)
01:38 PM Revision e8402690 (git): merge revision r48961 partially.
* tool/config_files.rb: use config.guess in gcc repo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@49172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nagachika (Tomoyuki Chikanaga)
01:03 PM Bug #10707: Segmentation fault when get refined new method in BasicObject
i wrote a patch for this. hanachin (Seiei Miyagi)
12:59 PM Bug #10707 (Closed): Segmentation fault when get refined new method in BasicObject
following code cause SEGV in ruby-trunk, 2.2.0, 2.1.5
``` ruby
module RefinementBug
refine BasicObject do
def foo
end
end
end
method(:foo)
```
it should be raise NameError like:
```
/Users/hanachin/tmp/bug...
hanachin (Seiei Miyagi)
12:49 PM Bug #10706: Segmentation fault when change visibility of refined new method
I wrote a test and patch. hanachin (Seiei Miyagi)
12:42 PM Bug #10706 (Closed): Segmentation fault when change visibility of refined new method
following code cause SEGV in ruby-trunk, 2.2.0, 2.1.5, 2.0.0p598
``` ruby
module RefinementBug
refine Object do
def foo
end
end
end
private(:foo)
```
it should be raise `NameError` like:
```
/Users/sei/tmp...
hanachin (Seiei Miyagi)
11:41 AM Bug #10705 (Closed): JSON::ParserError#message is wrong encoding (ASCII-8BIT)
JSON::ParserError#message is wrong encoding (ASCII-8BIT). I would expect the error to be whatever the internal encoding is (in my case, utf8), perhaps inspecting the string in the error message such that all characters would be valid in ... josh.cheek (Josh Cheek)
10:29 AM Revision 48ad2556 (git): dir.c: use macros
* dir.c (replace_real_basename): use macros for getattrlist
buffer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
10:19 AM Revision 10e74f03 (git): dir.c: cifs symlinkd on OSX
* dir.c (dir_initialize): workaround of opendir failure at symlink
directories on Windows via CIFS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
10:18 AM Revision 79219d96 (git): dir.c: GC guard
* dir.c (dir_initialize): add GC guard for retrying. the argument
of RSTRING_PTR() may be eliminated by optimization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
09:57 AM Feature #10701: Class:Array 2 New methods
An exception should be raised if the input is not found? nobu (Nobuyoshi Nakada)
09:53 AM Bug #10704 (Closed): Normalization of path names on OSX
Applied in changeset r49168.
----------
dir.c: normalize CIFS too
* dir.c (need_normalization): not only HFS+, CIFS (SMB) is also
decomposed. [Bug #10704]
nobu (Nobuyoshi Nakada)
08:26 AM Bug #10704 (Assigned): Normalization of path names on OSX
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/38356 によると、
> 正確にはVFSドライバのレイヤーですね。
> ...
とのことなので、仰る解釈は誤りです。
思うにFSごとに判別が必要でしょう。
naruse (Yui NARUSE)
08:23 AM Bug #10704 (Closed): Normalization of path names on OSX
OSXでのファイル名のUnicode normalizationは、今までHFS上の場合だけ行ってきましたが、HFS以外でも必要そうです。
## 実験
(1) Windows上でNFCとNFDのファイルを作る。
> cmd /c ver
Microsoft Windows [Version 6.1.7601]
> ruby -e '%W[\u{304c} \u{304b 3099}].each{|n| File.writ...
nobu (Nobuyoshi Nakada)
09:52 AM Revision 376c4e81 (git): dir.c: normalize CIFS too
* dir.c (need_normalization): not only HFS+, CIFS (SMB) is also
decomposed. [Bug #10704]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
09:52 AM Revision b04c6287 (git): Revert "dir.c: NORMALIZE_UTF8PATH"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e nobu (Nobuyoshi Nakada)
07:54 AM Bug #10703: Invalid Dates Bug Patch
Akira Tanaka:
I've highlighted this bug and offered a patch also. I love Ruby a lot. I wish I could say the same about its community.
Tsuyoshi Sawada:
It is a working solution. Instead of trolling, share your ingenious alternative.
NorthernLights (Imran "")
06:02 AM Bug #10703 (Rejected): Invalid Dates Bug Patch
Don't create a new ticket for a patch.
Use the original ticket, [Bug #10588], you reported.
akr (Akira Tanaka)
03:48 AM Bug #10703 (Rejected): Invalid Dates Bug Patch
The following is a pure Ruby-based patch to address the issues raised in [Bug 10588 Invalid Dates](http://bugs.ruby-lang.org/issues/10588):
~~~ruby
class SmartTime < Time
def self.mktime year, month, day
case month
when ...
NorthernLights (Imran "")
07:51 AM Revision a921841b (git): dir.c: NORMALIZE_UTF8PATH
* dir.c (NORMALIZE_UTF8PATH): Unicode decomposition seems to
perform in an upper layer than file systems on OSX, as all path
names are always decomposed regardless of file system types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tr...
nobu (Nobuyoshi Nakada)
04:58 AM Bug #10700 (Feedback): On case-sensitive filesystem on OS X, Dir.glob("*.TXT") matches case-insensitively
Can you try https://github.com/nobu/ruby/compare/Bug%2310700-OSX-case-folding ? nobu (Nobuyoshi Nakada)

01/06/2015

08:56 PM Revision bc5fd04f (git): * 2015-01-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e svn[bot]
08:56 PM Revision cd3bf498 (git): * test/ruby/test_method.rb: Add test for &-coersion of an
UnboundMethod.
* test/ruby/test_module.rb: Add test for define_method given an
UnboundMethod.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
headius (Charles Nutter)
04:06 PM Bug #10450: multiple assignment in conditional
We just got a report on JRuby that we DO NOT error if masgn is in a conditional: https://github.com/jruby/jruby/issues/2433#issuecomment-68882716
My main two takeaways:
1. I don't think many people ever try to do this since it took s...
enebo (Thomas Enebo)
03:28 PM Bug #10700: On case-sensitive filesystem on OS X, Dir.glob("*.TXT") matches case-insensitively
I just told @arsarih some of the horrific details of an environment I worked where they had case-insensitity built into a forked SVN client on a case sensitive filesystem. When people do not expect this behavior it leads to really confu... enebo (Thomas Enebo)
01:05 PM Bug #10700 (Closed): On case-sensitive filesystem on OS X, Dir.glob("*.TXT") matches case-insensitively
My Mac has the disk reformatted so that it is case-sensitive (HFS+):
~~~
$ touch foo.txt foo.TXT FOO.txt FOO.TXT
$ ls -li foo.* FOO.*
286444732 -rw-r--r-- 1 asari staff 0 Jan 6 08:00 FOO.TXT
286444731...
hasari (Hiro Asari)
03:24 PM Feature #10701: Class:Array 2 New methods
i think this functions might be interesting, but i would try to write them to that they are available in Enumerable too Hanmac (Hans Mackowiak)
02:48 PM Feature #10701 (Open): Class:Array 2 New methods
Hi,
New to this, but this is an Array method that I use a lot and thought it might be included in a release, it's basic, but very helpful when you need to rotate certain defined values ie. log rotation with monthly timestamps
~~~ru...
kruiserx (Eugene Kuhn)
12:42 PM Revision d50a8dd0 (git): Refine an assertion message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e akr (Akira Tanaka)
12:41 PM Bug #10698 (Closed): Time#local behaves differently during clock change
Applied in changeset r49162.
----------
* time.c (timelocalw): Set tm_isdst field -1 if vtm->isdst is
VTM_ISDST_INITVAL. This bug is introduced at packing struct
vtm (r45155).
[ruby-core:67345] [Bug #10698] Reported by Boris Ruf.
akr (Akira Tanaka)
12:41 PM Revision 9bbe6b9d (git): * time.c (timelocalw): Set tm_isdst field -1 if vtm->isdst is
VTM_ISDST_INITVAL. This bug is introduced at packing struct
vtm (r45155).
[ruby-core:67345] [Bug #10698] Reported by Boris Ruf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
akr (Akira Tanaka)
08:22 AM Bug #10699: m(*a, **b) doesn't recognize integer options.
https://github.com/nobu/ruby/compare/Bug%2310699-kwrest-all nobu (Nobuyoshi Nakada)
02:16 AM Bug #10699: m(*a, **b) doesn't recognize integer options.
#10118 is only for splat, not rest keywords argument. nobu (Nobuyoshi Nakada)
05:32 AM Revision c0ee6f2a (git): generic_object.rb: useless methods
* ext/json/lib/json/generic_object.rb (JSON::GenericObject):
remove useless overriding methods, [] and []=.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nobu (Nobuyoshi Nakada)
03:01 AM Feature #10118: Double splat for non-symbol keys
Yukihiro Matsumoto wrote:
> Double splat was introduced to pass a hash given from keyword arguments.
> ...
I've always considered the final hash to be a hash of options. I can't think of a reason to split the options hash in two based ...
josh.cheek (Josh Cheek)
01:19 AM Revision 57a00210 (git): add bold to headers
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e naruse (Yui NARUSE)
 

Also available in: Atom