Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000003930
gc_mark [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/gc.c:1632
1632 if (obj->as.basic.flags == 0) return; /* free cell */
(gdb) bt
#0 gc_mark [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/gc.c:1632
#1 0x000000010005af9c in rb_gc_mark (ptr=14640) at gc.c:1655
#2 0x000000010016ae75 in env_mark (ptr=0x100663f00) at vm.c:251
#3 0x000000010005a204 in gc_mark_children (objspace=0x10081a800, ptr=4312121760, lev=1) at gc.c:1860
#4 0x000000010016aecc in rb_thread_mark (ptr=0x100401c20) at vm.c:1722
#5 0x000000010005a204 in gc_mark_children (objspace=0x10081a800, ptr=4303788480, lev=1) at gc.c:1860
#6 0x000000010016adb9 in vm_mark_each_thread_func (key=<value temporarily unavailable, due to optimizations>, value=<value temporarily unavailable, due to optimizations>, dummy=<value temporarily unavailable, due to optimizations>) at vm.c:1553
#7 0x00000001001100e0 in st_foreach (table=0x100413f30, func=0x10016adb0 <vm_mark_each_thread_func>, arg=0) at st.c:747
#8 0x000000010016c9ad in rb_vm_mark (ptr=0x100401840) at vm.c:1576
#9 0x000000010005a204 in gc_mark_children (objspace=0x10081a800, ptr=4303788520, lev=1) at gc.c:1860
#10 0x000000010005c6e3 in gc_marks (objspace=0x10081a800) at gc.c:1649
#11 0x000000010005d745 in before_gc_sweep [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/gc.c:2194
#12 0x000000010005d745 in rb_newobj () at gc.c:1655
#13 0x00000001001181bf in str_alloc [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/string.c:373
#14 0x00000001001181bf in str_new (klass=4303856400, ptr=0x101094883 " # @private\n def initialize(object, method_name, proxy)\n @method_name = method_name\n @object = object\n @proxy = proxy\n\n @method_stasher = InstanceMethodStasher.ne"..., len=17) at string.c:1655
#15 0x000000010007590a in rb_io_getline_1 (rs=4303815520, limit=-1, io=4303479800) at io.c:2653
#16 0x00000001000ad199 in lex_getline [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/parse.y:5280
#17 0x00000001000ad199 in parser_yylex (parser=0x100672de0) at parse.y:1655
#18 0x00000001000b5179 in ruby_yyparse (parser=<value temporarily unavailable, due to optimizations>) at parse.y:7938
#19 0x00000001000c2c9f in yycompile0 (arg=<value temporarily unavailable, due to optimizations>, tracing=<value temporarily unavailable, due to optimizations>) at parse.y:5217
#20 0x000000010018bfd3 in thread_suppress_tracing (th=0x100401c20, ev=<value temporarily unavailable, due to optimizations>, func=0x1000c2be0 <yycompile0>, arg=4301729248, always=<value temporarily unavailable, due to optimizations>) at thread.c:4578
#21 0x00000001000a0910 in rb_parser_compile_file (vparser=4303480000, f=0x100645220 "/Users/charlie/.rvm/gems/ruby-1.9.3-p327/gems/rspec-mocks-2.12.0/lib/rspec/mocks/method_double.rb", file=4303479800, start=1) at parse.y:5243
#22 0x00000001001067dc in load_file_internal (arg=<value temporarily unavailable, due to optimizations>) at ruby.c:1649
#23 0x0000000100042b4f in rb_ensure (b_proc=0x1001066f0 <load_file_internal>, data1=140734799790912, e_proc=0x100104310 <restore_lineno>, data2=1) at eval.c:744
#24 0x0000000100104abe in rb_load_file (fname=0x100645220 "/Users/charlie/.rvm/gems/ruby-1.9.3-p327/gems/rspec-mocks-2.12.0/lib/rspec/mocks/method_double.rb") at ruby.c:1686
#25 0x00000001000460aa in rb_load_internal (fname=4303481080, wrap=<value temporarily unavailable, due to optimizations>) at load.c:306
#26 0x00000001000474cc in rb_require_safe (fname=4303654600, safe=0) at load.c:620
#27 0x0000000100184627 in vm_call_cfunc [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/vm_insnhelper.c:404
#28 0x0000000100184627 in vm_call_method (th=0x100401c20, cfp=0x1005ff3f8, num=1, blockptr=0x1, flag=8, id=<value temporarily unavailable, due to optimizations>, me=0x10186d970, recv=4303859480) at vm_insnhelper.c:1655
#29 0x0000000100174522 in vm_exec_core (th=0x100401c20, initial=<value temporarily unavailable, due to optimizations>) at insns.def:1018
#30 0x0000000100178da3 in vm_exec (th=0x100401c20) at vm.c:1223
#31 0x0000000100179370 in rb_iseq_eval (iseqval=4303645760) at vm.c:1450
#32 0x000000010004610b in rb_load_internal (fname=4303657800, wrap=<value temporarily unavailable, due to optimizations>) at load.c:310
#33 0x00000001000474cc in rb_require_safe (fname=4303665920, safe=0) at load.c:620
#34 0x0000000100184627 in vm_call_cfunc [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/vm_insnhelper.c:404
#35 0x0000000100184627 in vm_call_method (th=0x100401c20, cfp=0x1005ff558, num=1, blockptr=0x1, flag=8, id=<value temporarily unavailable, due to optimizations>, me=0x10186d970, recv=4303859480) at vm_insnhelper.c:1655
#36 0x0000000100174522 in vm_exec_core (th=0x100401c20, initial=<value temporarily unavailable, due to optimizations>) at insns.def:1018
#37 0x0000000100178da3 in vm_exec (th=0x100401c20) at vm.c:1223
#38 0x0000000100179370 in rb_iseq_eval (iseqval=4303701760) at vm.c:1450
#39 0x000000010004610b in rb_load_internal (fname=4312197960, wrap=<value temporarily unavailable, due to optimizations>) at load.c:310
#40 0x00000001000474cc in rb_require_safe (fname=4312199320, safe=0) at load.c:620
#41 0x0000000100184627 in vm_call_cfunc [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/vm_insnhelper.c:404
#42 0x0000000100184627 in vm_call_method (th=0x100401c20, cfp=0x1005ff6b8, num=1, blockptr=0x1, flag=8, id=<value temporarily unavailable, due to optimizations>, me=0x10186d970, recv=4303859480) at vm_insnhelper.c:1655
#43 0x0000000100174522 in vm_exec_core (th=0x100401c20, initial=<value temporarily unavailable, due to optimizations>) at insns.def:1018
#44 0x0000000100178da3 in vm_exec (th=0x100401c20) at vm.c:1223
#45 0x0000000100179370 in rb_iseq_eval (iseqval=4312127600) at vm.c:1450
#46 0x000000010004610b in rb_load_internal (fname=4303767560, wrap=<value temporarily unavailable, due to optimizations>) at load.c:310
#47 0x00000001000474cc in rb_require_safe (fname=4328992600, safe=0) at load.c:620
#48 0x0000000100184627 in vm_call_cfunc [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/vm_insnhelper.c:404
#49 0x0000000100184627 in vm_call_method (th=0x100401c20, cfp=0x1005ff870, num=1, blockptr=0x1, flag=8, id=<value temporarily unavailable, due to optimizations>, me=0x10186d970, recv=4329380560) at vm_insnhelper.c:1655
#50 0x0000000100174522 in vm_exec_core (th=0x100401c20, initial=<value temporarily unavailable, due to optimizations>) at insns.def:1018
#51 0x0000000100178da3 in vm_exec (th=0x100401c20) at vm.c:1223
#52 0x0000000100179370 in rb_iseq_eval (iseqval=4328956120) at vm.c:1450
#53 0x000000010004610b in rb_load_internal (fname=4328973600, wrap=<value temporarily unavailable, due to optimizations>) at load.c:310
#54 0x000000010004792d in rb_f_load (argc=<value temporarily unavailable, due to optimizations>, argv=<value temporarily unavailable, due to optimizations>) at load.c:384
#55 0x0000000100184627 in vm_call_cfunc [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/vm_insnhelper.c:404
#56 0x0000000100184627 in vm_call_method (th=0x100401c20, cfp=0x1005ffce8, num=1, blockptr=0x1, flag=8, id=<value temporarily unavailable, due to optimizations>, me=0x100477100, recv=4329380560) at vm_insnhelper.c:1655
#57 0x0000000100174522 in vm_exec_core (th=0x100401c20, initial=<value temporarily unavailable, due to optimizations>) at insns.def:1018
#58 0x0000000100178da3 in vm_exec (th=0x100401c20) at vm.c:1223
#59 0x000000010018959e in rb_yield (val=4328974760) at vm.c:657
#60 0x00000001000093ae in rb_ary_each (array=<value temporarily unavailable, due to optimizations>) at array.c:1495
#61 0x0000000100184627 in vm_call_cfunc [inlined] () at /Users/charlie/.rvm/src/ruby-1.9.3-p327/vm_insnhelper.c:404
#62 0x0000000100184627 in vm_call_method (th=0x100401c20, cfp=0x1005ffdf0, num=0, blockptr=0x1005ffe19, flag=0, id=<value temporarily unavailable, due to optimizations>, me=0x100444a10, recv=4328973760) at vm_insnhelper.c:1655
#63 0x0000000100174522 in vm_exec_core (th=0x100401c20, initial=<value temporarily unavailable, due to optimizations>) at insns.def:1018
#64 0x0000000100178da3 in vm_exec (th=0x100401c20) at vm.c:1223
#65 0x000000010017a3ad in rb_vm_invoke_proc (th=<value temporarily unavailable, due to optimizations>, proc=0x101809fb0, self=4329998640, argc=0, argv=0x1020d2bc0, blockptr=0x0) at vm.c:627
#66 0x000000010004572c in rb_exec_end_proc () at eval_jump.c:126
#67 0x0000000100045845 in ruby_finalize_0 () at eval.c:92
#68 0x0000000100045980 in ruby_cleanup (ex=0) at eval.c:133
#69 0x0000000100045cd3 in ruby_run_node (n=<value temporarily unavailable, due to optimizations>) at eval.c:244
#70 0x0000000100000edf in main (argc=2, argv=0x7fff5fbff368) at main.c:38
==25157== Invalid read of size 8
==25157== at 0x1748E0: vm_make_env_each (vm.c:364)
==25157== by 0x174C44: rb_vm_make_env_object (vm.c:480)
==25157== by 0xC108CA: binding_of_caller (binding_of_caller.c:151)
==25157== by 0xC10B1F: callers (binding_of_caller.c:207)
==25157== by 0x18B626: vm_call_method (vm_insnhelper.c:404)
==25157== by 0x17B521: vm_exec_core (insns.def:1018)
==25157== by 0x17FDA2: vm_exec (vm.c:1223)
==25157== by 0x1813AC: rb_vm_invoke_proc (vm.c:627)
==25157== by 0x181885: vm_call0 (vm_insnhelper.c:433)
==25157== by 0x184ABD: rb_funcall2 (vm_eval.c:236)
==25157== by 0x9D632: rb_class_new_instance (object.c:1636)
==25157== by 0x1817F1: vm_call0 (vm_eval.c:79)
==25157== Address 0x101ad1370 is 16 bytes inside a block of size 32 free'd
==25157== at 0x506E: free (vg_replace_malloc.c:430)
==25157== by 0x171ACD: env_free (vm.c:273)
==25157== by 0x5EAB3: finalize_list (gc.c:2932)
==25157== by 0x1970A4: rb_threadptr_execute_interrupts_common (thread.c:1311)
==25157== by 0x1820F2: vm_call0 (vm_eval.c:147)
==25157== by 0x185C4D: rb_funcall (vm_eval.c:236)
==25157== by 0x10D7C8: load_file_internal (ruby.c:1648)
==25157== by 0x49B4E: rb_ensure (eval.c:744)
==25157== by 0x10BABD: rb_load_file (ruby.c:1686)
==25157== by 0x4D0A9: rb_load_internal (load.c:306)
==25157== by 0x4E4CB: rb_require_safe (load.c:620)
==25157== by 0x18B626: vm_call_method (vm_insnhelper.c:404)
==25157==
......................................
Finished in 5.64 seconds
38 examples, 0 failures
==25157== Invalid read of size 4
==25157== at 0x181110: rb_vm_invoke_proc (vm.c:677)
==25157== by 0x4C72B: rb_exec_end_proc (eval_jump.c:126)
==25157== by 0x4C844: ruby_finalize_0 (eval.c:92)
==25157== by 0x4C97F: ruby_cleanup (eval.c:133)
==25157== by 0x4CCD2: ruby_run_node (eval.c:244)
==25157== by 0x100000EDE: main (main.c:38)
==25157== Address 0x101ad13fc is not stack'd, malloc'd or (recently) free'd
==25157==
Hope this helps.