#109: rb_eval_string does not work properly ---------------------------------+------------------------------------------ Reporter: tali.wang@gmail.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Following codes crash the app. #import <Cocoa/Cocoa.h> #import <MacRuby/MacRuby.h> int main(){ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; RUBY_INIT_STACK; ruby_init(); rb_eval_string("puts 1234"); rb_eval_string("puts 34"); rb_eval_string("a=1234"); rb_eval_string("b=a+1234"); rb_eval_string("puts a+b"); [pool release]; return 0; } Readout: 1234 34 <dummy toplevel>: [BUG] Bus Error MacRuby version 0.3 (ruby 1.9.0 2008-06-03) [universal-darwin9.4] -- stack frame ------------ 0000 (0x30030): 00000004 0001 (0x30034): 00000001 <- lfp <- dfp -- control frame ---------- c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP --------------------------- -- backtrace of native function call (Use addr2line) -- 0x2b5fe6 0x1dee1c 0x1dee5b 0x26ff7b 0x9063509b 0xffffffff 0x1e3c63 0x2ad820 0x2adc81 0x2adfd1 0x1f18 0x1e52 ------------------------------------------------------- Abort trap -- Ticket URL: <https://www.macruby.org/trac/ticket/109> macruby <http://macruby.org/>