[#45906] ' failures. — Tanaka Akira <akr@...>
' の扱いが変化したことで、テストが失敗しているようです。
9 messages
2012/07/04
[#45910] [ruby-trunk - Bug #6694][Open] Thread.new without block. — "ko1 (Koichi Sasada)" <redmine@...>
24 messages
2012/07/04
[#45928] Re: [ruby-cvs:43524] kosaki:r36348 (trunk): * include/ruby/ruby.h: Removed RUBY_GLOBAL_SETUP complely. It is — SASADA Koichi <ko1@...>
ささだです.
3 messages
2012/07/09
[#45973] [ruby-trunk - Bug #6751][Assigned] remove tempfiles early. — "akr (Akira Tanaka)" <akr@...>
4 messages
2012/07/18
[#45976] [ruby-trunk - Bug #6756][Open] FileUtils.rm_rf がアクセス権のない空ディレクトリを削除しない — "fumiyas (Fumiyasu SATOH)" <fumiyas@...>
9 messages
2012/07/20
[#45977] [ruby-trunk - Feature #6757][Open] [PATCH] Add Process.getsid — "fumiyas (Fumiyasu SATOH)" <fumiyas@...>
6 messages
2012/07/20
[#46012] [ruby-trunk - Feature #6812][Open] Refactor gc.c — "authorNari (Narihiro Nakamura)" <authorNari@...>
13 messages
2012/07/30
[ruby-dev:45936] Re: [ruby-changes:24312] yugui:r36363 (trunk): * vm_eval.c (rb_eval_string_from_file,
From:
SASADA Koichi <ko1@...>
Date:
2012-07-11 06:03:40 UTC
List:
ruby-dev #45936
yugui さんへ
(2012/07/11 12:25), yugui wrote:
> Index: vm_eval.c
+/** @note This function name is not stable. */
VALUE
+ruby_eval_string_from_file(const char *str, const char *filename) {
+ return eval_string(rb_vm_top_self(), rb_str_new2(str), Qnil,
filename, 1);
+}
+
...
> +VALUE
> +ruby_eval_string_from_file_protect(const char *str, const char *filename, int *state) {
> + struct eval_string_from_file_arg arg = { str, filename };
> + return rb_protect((VALUE (*)(VALUE))eval_string_from_file_helper, (VALUE)&arg, state);
> +}
結局 encoding はどうしたんですか? あと,protect だけで良さそうな気が
します.
> +/**
> + * Evaluates the given string in an isolated binding.
> + *
> + * Here "isolated" means the binding does not inherit any other binding. This
> + * behaves same as the binding for required libraries.
> + *
> + * __FILE__ will be "(eval)", and __LINE__ starts from 1 in the evaluation.
> + *
> + * @param str Ruby code to evaluate.
> + * @return The evaluated result.
> + * @throw Exception Raises an exception on error.
> + */
> +VALUE
> rb_eval_string(const char *str)
> {
> - return eval_string(rb_vm_top_self(), rb_str_new2(str), Qnil, "(eval)", 1);
> + return ruby_eval_string_from_file(str, "eval");
> }
"(eval)" じゃなくて "eval" で良いですか?
----
将来的には,IRC で言いましたが,ruby_call_as_main(funcptr, data,
state) 的なものだけにするかも. main な環境で funcptr(data) を呼び出す,
呼び出された場所では rb_ な C API を使い放題,例外は state に記録,的な.
--
// SASADA Koichi at atdot dot net