[#64517] Fw: Re: Ruby and Rails to become Apache Incubator Project — Tetsuya Kitahata <[email protected]>

What do you think? >> Ruby developers

13 messages 2014/08/23

[#64615] [ruby-trunk - Feature #10181] [Open] New method File.openat() — oss-ruby-lang@...

Issue #10181 has been reported by Technorama Ltd..

10 messages 2014/08/28
[#64616] Re: [ruby-trunk - Feature #10181] [Open] New method File.openat() — Eric Wong <normalperson@...> 2014/08/28

I like this feature.

[#64671] Fwd: [ruby-changes:35240] normal:r47322 (trunk): symbol.c (rb_sym2id): do not return garbage object — SASADA Koichi <ko1@...>

Why this fix solve your problem?

9 messages 2014/08/30
[#64672] Re: Fwd: [ruby-changes:35240] normal:r47322 (trunk): symbol.c (rb_sym2id): do not return garbage object — SASADA Koichi <ko1@...> 2014/08/30

(2014/08/30 8:50), SASADA Koichi wrote:

[ruby-core:64557] [ruby-trunk - Bug #10167] Prime#include?(mod) hangs up

From: zn@...
Date: 2014-08-26 00:38:09 UTC
List: ruby-core #64557
Issue #10167 has been updated by Kazuhiro NISHIYAMA.


workaround:

~~~
enumerables = []
module_include_p = Module.method(:include?).unbind
ObjectSpace.each_object(Class) do |klass|
  if module_include_p.bind(klass).call(Enumerable)
    enumerables.push klass
  end
end
~~~

----------------------------------------
Bug #10167: Prime#include?(mod) hangs up
https://bugs.ruby-lang.org/issues/10167#change-48484

* Author: Kenichi Saita
* Status: Open
* Priority: Normal
* Assignee: 
* Category: lib
* Target version: current: 2.2.0
* ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
We expect `Prime` class implements `Module#include?(mod)`.  But `Prime#include?(mod)` hangs up, because it is overwritten by `Enumerable#include?(obj)` and tries to search `mod` linearly from infinite sequence of prime numbers.


**Reproducible script:**

~~~
$ ruby -e 'require "prime"; puts Prime.include?(Enumerable)'
~~~

* Expected: returns `true`
* Actual: hangs up


I found this bug by the following code (hangs up if prime is required)

~~~
enumerables = []
ObjectSpace.each_object(Class){|klass|
  if klass.include?(Enumerable) then
    enumerables.push klass
  end
}
~~~



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next