Issue #5690 has been updated by ko1 (Koichi Sasada).


I got SEGV.
could you run "make test-rubyspec" on your environment?

/mnt/sdb1/ruby/trunk/spec/rubyspec/core/module/const_get_spec.rb:34: [BUG] Segmentation fault
ruby 2.0.0dev (2012-10-27 trunk 37336) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0031 p:---- s:0108 e:000107 CFUNC  :const_get
c:0030 p:0038 s:0104 e:000103 BLOCK  /mnt/sdb1/ruby/trunk/spec/rubyspec/core/module/const_get_spec.rb:34 [FINISH]
c:0029 p:---- s:0101 e:000100 CFUNC  :instance_eval
c:0028 p:0014 s:0098 e:000097 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:69
c:0027 p:0017 s:0092 e:000091 BLOCK  /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:179 [FINISH]
c:0026 p:---- s:0089 e:000088 IFUNC
c:0025 p:---- s:0087 e:000086 CFUNC  :each
c:0024 p:---- s:0085 e:000084 CFUNC  :all?
c:0023 p:0044 s:0082 e:000081 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:179
c:0022 p:0077 s:0076 e:000075 BLOCK  /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:208
c:0021 p:0004 s:0072 e:000071 BLOCK  /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:239 [FINISH]
c:0020 p:---- s:0070 e:000069 CFUNC  :times
c:0019 p:0017 s:0067 e:000066 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:238
c:0018 p:0011 s:0064 e:000063 BLOCK  /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:200 [FINISH]
c:0017 p:---- s:0061 e:000060 CFUNC  :each
c:0016 p:0091 s:0058 e:000057 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:199
c:0015 p:0087 s:0055 e:000054 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:38
c:0014 p:0030 s:0048 e:000047 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/object.rb:11
c:0013 p:0045 s:0041 e:000c28 TOP    /mnt/sdb1/ruby/trunk/spec/rubyspec/core/module/const_get_spec.rb:4 [FINISH]
c:0012 p:---- s:0039 e:000038 CFUNC  :load
c:0011 p:0014 s:0035 e:000034 BLOCK  /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:57 [FINISH]
c:0010 p:---- s:0033 e:000032 CFUNC  :instance_eval
c:0009 p:0014 s:0030 e:000029 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:69
c:0008 p:0061 s:0024 e:0000e0 BLOCK  /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:57 [FINISH]
c:0007 p:---- s:0021 e:000020 CFUNC  :each
c:0006 p:0042 s:0018 e:001450 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:51
c:0005 p:0015 s:0014 e:000013 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:43
c:0004 p:0047 s:0011 e:000010 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/commands/mspec-run.rb:91
c:0003 p:0077 s:0008 e:000007 METHOD /mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/utils/script.rb:218
c:0002 p:0047 s:0004 e:000ac8 EVAL   /mnt/sdb1/ruby/trunk/spec/mspec/bin/mspec-run:8 [FINISH]
c:0001 p:0000 s:0002 e:0007f8 TOP    [FINISH]

/mnt/sdb1/ruby/trunk/spec/mspec/bin/mspec-run:8:in `<main>'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/utils/script.rb:218:in `main'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/commands/mspec-run.rb:91:in `run'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:43:in `process'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:51:in `files'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:51:in `each'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:57:in `block in files'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:69:in `protect'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:69:in `instance_eval'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:57:in `block (2 levels) in files'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:57:in `load'
/mnt/sdb1/ruby/trunk/spec/rubyspec/core/module/const_get_spec.rb:4:in `<top (required)>'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/object.rb:11:in `describe'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:38:in `describe'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:199:in `process'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:199:in `each'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:200:in `block in process'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:238:in `repeat'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:238:in `times'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:239:in `block in repeat'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:208:in `block (2 levels) in process'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:179:in `protect'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:179:in `all?'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:179:in `each'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/context.rb:179:in `block in protect'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:69:in `protect'
/mnt/sdb1/ruby/trunk/spec/mspec/lib/mspec/runner/mspec.rb:69:in `instance_eval'
/mnt/sdb1/ruby/trunk/spec/rubyspec/core/module/const_get_spec.rb:34:in `block (2 levels) in <top (required)>'
/mnt/sdb1/ruby/trunk/spec/rubyspec/core/module/const_get_spec.rb:34:in `const_get'

-- C level backtrace information -------------------------------------------
make: *** [test-rubyspec] ?????????????????????

----------------------------------------
Feature #5690: Module#qualified_const_get
https://bugs.ruby-lang.org/issues/5690#change-31723

Author: wycats (Yehuda Katz)
Status: Assigned
Priority: Normal
Assignee: tenderlovemaking (Aaron Patterson)
Category: core
Target version: 2.0.0


It would be great if there was a way to dynamically load a constant path:

  module Foo
    module Bar
      module Baz
      end
    end
  end

  Foo.qualified_const_get("Bar::Baz") => Foo::Bar::Baz


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