#1025: Sandbox#apply! causes segfault when no argument is passed to constructor. -----------------------------+---------------------------------------------- Reporter: rob@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: | -----------------------------+---------------------------------------------- Comment(by watson1978@…): I see :) [[BR]] By the way, I think whether the following changes are necessary in rb_sandbox_init. {{{ #!diff diff --git a/sandbox.c b/sandbox.c index 9cfc172..145007a 100644 --- a/sandbox.c +++ b/sandbox.c @@ -33,7 +33,7 @@ rb_sandbox_init(VALUE obj, SEL sel, VALUE profile) Data_Get_Struct(obj, rb_sandbox_t, box); GC_WB(&box->profile, ruby_strdup(RSTRING_PTR(profile))); - box->flags = 0; + box->flags = SANDBOX_NAMED; return obj; } }}} Before changing it, raise a SecurityError: {{{ $ DYLD_LIBRARY_PATH=. ./macruby -e 'Sandbox.new("no-internet").apply!' -e:1:in `<main>': Couldn't apply sandbox: `line 1: unbound variable: no- internet ` (SecurityError) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1025#comment:7> MacRuby <http://macruby.org/>