Hi,

At Wed, 9 Jan 2008 02:04:03 +0900,
Dave Thomas wrote in [ruby-core:14848]:
> int main(int argc, char **argv) {
>    VALUE result;
> 
>    ruby_sysinit(&argc, &argv);
>    RUBY_INIT_STACK;

RUBY_INIT_STACK must be at the top of a block, since it
contains a variable declaration.

And RUBY_GLOBAL_SETUP should be before main().


>    ruby_init();
>    ruby_init_loadpath();
> 
>    rb_require("sum.rb");
>    rb_eval_string("$summer = Summer.new");
>    rb_eval_string("$result = $summer.sum(10)");
>    result = rb_gv_get("result");
                        "$result"

rb_gv_get and others need the sigil.

-- 
Nobu Nakada