[#28616] win32ole/test_folderitem2_invokeverb.rb:6:in `require': no such file to load -- win32ole (LoadError) — Tanaka Akira <akr@...17n.org>
2006-05-01 から、Ruby 1.9 が i686-linux な環境の test-all で
7 messages
2006/05/06
[#28617] Re: win32ole/test_folderitem2_invokeverb.rb:6:in `require': no such file to load -- win32ole (LoadError)
— Tadashi Saito <shiba@...2.accsnet.ne.jp>
2006/05/06
こんばんは。斎藤と申します。
[#28618] Re: win32ole/test_folderitem2_invokeverb.rb:6:in `require': no such file to load -- win32ole (LoadError)
— Masaki Suketa <masaki.suketa@...>
2006/05/06
助田です。
[#28623] Re: win32ole/test_folderitem2_invokeverb.rb:6:in `require': no such file to load -- win32ole (LoadError)
— Tadashi Saito <shiba@...2.accsnet.ne.jp>
2006/05/07
こんばんは。斎藤と申します。
[#28624] Re: win32ole/test_folderitem2_invokeverb.rb:6:in `require': no such file to load -- win32ole (LoadError)
— "Hiroyuki Iwatsuki" <don@...>
2006/05/08
岩月と申します。
[#28619] strtod in 1.8.4 stable snapshot — Shin-ichiro HARA <sinara@...>
原です。
7 messages
2006/05/07
[#28633] load_to(file, mod) — Hidetoshi NAGAI <nagai@...>
永井@知能.九工大です.
8 messages
2006/05/11
[#28649] cgi.rbのUTF-8対応について — Fujioka <fuj@...>
藤岡です。
7 messages
2006/05/18
[#28653] create header (Re: Re: ossl_cipher.c:124: warning: control reaches end of non-void function) — "Nobuyoshi Nakada" <nobu@...>
なかだです。
8 messages
2006/05/18
[#28659] Re: create header (Re: Re: ossl_cipher.c:124: warning: control reaches end of non-void function)
— Tanaka Akira <akr@...17n.org>
2006/05/20
In article <cebd6fd10605180214i2ae903b7ja489be82184cc58c@mail.gmail.com>,
[#28660] Re: create header (Re: Re: ossl_cipher.c:124: warning: control reaches end of non-void function)
— nobu@...
2006/05/21
なかだです。
[#28662] Re: create header (Re: Re: ossl_cipher.c:124: warning: control reaches end of non-void function)
— "Nobuyoshi Nakada" <nobu@...>
2006/05/22
なかだです。
[#28674] Re: create header (Re: Re: ossl_cipher.c:124: warning: control reaches end of non-void function)
— Tanaka Akira <akr@...>
2006/05/30
In article <cebd6fd10605212130s32e08e5eh7777fbf2ebbb7f7@mail.gmail.com>,
[ruby-dev:28671] Re: load_to(file, mod)
From:
Shugo Maeda <shugo@...>
Date:
2006-05-29 08:27:04 UTC
List:
ruby-dev #28671
前田です。
Hidetoshi NAGAI wrote:
> やりたいのは,$SAFE == 4 で load(path, true) したスクリプト中の
> load(path2) を同じ無名モジュール中で評価したいというものです.
> さらには,load() の外から load 内の監視もしたいと思ってます.
>
> load メソッドをくるんでやることである程度までは行けるのですが,
> 無名モジュールが取得できなくてだめだったり,
> それを避けると self が main ではなくなってしまったりで頭を悩ませてます.
>
> mod.module_eval(File.read(path)) の File.read(path) を
> うまくくるんでやって,self が mod になってしまう点は
> 妥協するしか方法はないのでしょうか.
generate_binding.rbという名前で
----- ここから ----- ここから ----- ここから ----- ここから -----
$binding = binding
----- ここまで ----- ここまで ----- ここまで ----- ここまで -----
という内容のファイルを用意しておいて、
----- ここから ----- ここから ----- ここから ----- ここから -----
def generate_binding
Thread.critical = true
begin
load("generate_binding.rb", true)
return $binding
ensure
Thread.critical = false
end
end
b = generate_binding
# 1回目の実行
eval("def hello; puts 'hello world'; end", b)
# 2回目の実行
eval("hello", b)
----- ここまで ----- ここまで ----- ここまで ----- ここまで -----
という手を使うのはどうでしょうか。
--
前田 修吾