Project

General

Profile

Actions

Bug #3423

closed

Inconsistent behaviour of Module#const_get with included modules

Added by judofyr (Magnus Holm) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.3.0]
Backport:
[ruby-core:30720]

Description

=begin
module Foo
A = 1
end

class Object
include Foo
end

class Bar
include Foo
end

Object.const_get(:A, false) # => works fine
Bar.const_get(:A, false) # => raises error

Untested patch attached. This might also fix #3422.
=end


Files

yay.diff (389 Bytes) yay.diff judofyr (Magnus Holm), 06/11/2010 04:16 AM

Related issues 2 (0 open2 closed)

Related to Ruby master - Bug #5264: Commit 33157Closed09/02/2011Actions
Has duplicate Ruby master - Bug #3422: Object.const_get(:A, false) can access BasicObject::AClosedkosaki (Motohiro KOSAKI)06/11/2010Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0