[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

overriding autoloads with classes and modules

From: Thomas Enebo <Thomas.Enebo@...>
Date: 2007-05-06 23:33:57 UTC
List: ruby-core #11104
Works (arbitrary constant assignment overrides autoload):
--- autoloaded.rb ---
Foo = 1
--- autoloaded.rb ---

--- main.rb ---
autoload "Foo", "autoloaded.rb"
Foo = 2
assert_equal(2, Foo)
--- main.rb ---

Does not work (override with class OR module definition):
--- main2.rb ---
autoload "Foo", "autoloaded.rb"
class Foo; end
--- main2.rb ---

I had patched JRuby to allow this second case for both modules and 
classes, but then noticed that Ruby 1.8.5 (I did not check 1.9) doesn't 
work (Foo is not a class).   I have undid these changes in JRuby to make 
sure we match MRI behavior.

Is this a bug?  From my perspective I think if you allow object 
assignment to work to override autoloads you should also allow class or 
module definition to do it as well.

-Tom

--
Thomas E Enebo <thomas.enebo@sun.com>
JRuby Core Developer, http://www.bloglines.com/blog/ThomasEEnebo


In This Thread

Prev Next