Project

General

Profile

Actions

Bug #4565

closed

incompatible change at rev.31169 about autoload

Added by nagai (Hidetoshi Nagai) over 13 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2011-04-10 trunk 31255) [x86_64-linux]
Backport:
[ruby-core:35679]

Description

=begin
After rev.31169, const_defined? about a pre-autoloading constant on a included module returns true.

Ruby/Tk cannot work on rev.31169 or later.

On ruby1.8 and before rev.31169, returns false.
For example, the following outputs a different result between before rev.31169 and after.

module X; autoload :A, 'foo.rb'; end
module M; include X; end
p M.const_defined? :A

see also, [ruby-dev:43383].

This change makes it impossible checking M::A is defined on M or included from X without autoloading,
beacause M.autoload?(:A) returns nil.
Even if M.autoload?(:A) returns 'foo.rb', it is not a good solution.
It has a same problem about where the autoload is defined.
At least, Ruby/Tk requires a way to check it for default-widget-set control.

Hidetoshi NAGAI ()
Department of Artificial Intelligence, Kyushu Institute of Technology

=end

Actions #1

Updated by naruse (Yui NARUSE) over 13 years ago

  • Status changed from Open to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)

=begin

=end

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0