Project

General

Profile

Actions

Bug #4886

closed

autoload in instance_eval doesn't work

Added by naruse (Yui NARUSE) over 13 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2011-06-15 trunk 32096) [x86_64-freebsd8.2]
Backport:
[ruby-dev:43816]

Description

autoload を instance_eval の中で使うとうまく動きません。

% ./ruby -e'instance_eval{autoload :R,"a";p R}'
-e:1:in block in <main>': uninitialized constant R (NameError) from -e:1:in instance_eval'
from -e:1:in `'

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0