New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression: singleton class cannot see module/class defined in the parent module #3568

tsahara opened this Issue Mar 30, 2017 · 0 comments


None yet
1 participant

tsahara commented Mar 30, 2017

This issue is same as #1983.

module Mod
  module InnerModule
  class InnerClass
  class << self
    InnerModule #=> uninitialized constant InnerModule (NameError)
    InnerClass #=> uninitialized constant InnerClass (NameError)
% ruby -v a.rb
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]
a.rb:7: warning: possibly useless use of a constant in void context

% bin/mruby a.rb
	[0] a.rb:7
	[1] a.rb:6
	[2] a.rb:1
a.rb:7: uninitialized constant #<Class:Mod>::InnerModule (NameError)

@matz matz closed this in 507e00e Mar 31, 2017

matz added a commit that referenced this issue Mar 31, 2017

Merge pull request #3571 from keizo042/fix_get_constant_of_module_fro…

Modify to get constant of parent module in singleton class; fix #3568
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment