From ruby-noreply at macosforge.org Tue Nov 2 13:49:23 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 02 Nov 2010 20:49:23 -0000 Subject: [MacRuby] #352: macirb does not eval UTF-String In-Reply-To: <041.e59ea27a2cdbf541967c30a32b0004a9@macosforge.org> References: <041.e59ea27a2cdbf541967c30a32b0004a9@macosforge.org> Message-ID: <050.8e59a6d27b965f44d82ad1780700a6a0@macosforge.org> #352: macirb does not eval UTF-String ------------------------+--------------------------------------------------- Reporter: dev@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | ------------------------+--------------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.7 Comment: Thanks. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 2 16:28:53 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 02 Nov 2010 23:28:53 -0000 Subject: [MacRuby] #985: Need to implement rb_obj_instance_eval In-Reply-To: <051.889f0c54db0c180d16ebb77a0319d0ae@macosforge.org> References: <051.889f0c54db0c180d16ebb77a0319d0ae@macosforge.org> Message-ID: <060.1806a3af7f2963d00240fc771a74aaf7@macosforge.org> #985: Need to implement rb_obj_instance_eval ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Should be fixed in r4872. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 2 19:08:40 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 03 Nov 2010 02:08:40 -0000 Subject: [MacRuby] #985: Need to implement rb_obj_instance_eval In-Reply-To: <051.889f0c54db0c180d16ebb77a0319d0ae@macosforge.org> References: <051.889f0c54db0c180d16ebb77a0319d0ae@macosforge.org> Message-ID: <060.776b8b309f7fff3994fcd8abc0da50e4@macosforge.org> #985: Need to implement rb_obj_instance_eval ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Comment(by watson1978@?): Thank you for your commit. I have confirmed that the example of the http://rmagick.rubyforge.org/portfolio.html works completely. :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 2 19:17:59 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 03 Nov 2010 02:17:59 -0000 Subject: [MacRuby] #979: Find.find standard library broken in macirb In-Reply-To: <046.0b4b859312990e5025d4f17f8e8fd082@macosforge.org> References: <046.0b4b859312990e5025d4f17f8e8fd082@macosforge.org> Message-ID: <055.4f5a02ce0d582d95a7fc1c94188e5043@macosforge.org> #979: Find.find standard library broken in macirb ------------------------------+--------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: binding __FILE__ | ------------------------------+--------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Should be fixed in r4874. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 3 14:41:30 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 03 Nov 2010 21:41:30 -0000 Subject: [MacRuby] #987: NSTask segfault Message-ID: <046.8a5023d1899e09a62279af5c738b978b@macosforge.org> #987: NSTask segfault -----------------------------+---------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: segfault NSTask -----------------------------+---------------------------------------------- When executing thefollowing erroneous code, where arguments should be in an array: framework "foundation" task = NSTask.launchedTaskWithLaunchPath("/bin/ls", arguments:"-l") p task.isRunning p task.standardOutput I get: => Segmentation fault -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 3 17:32:19 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 04 Nov 2010 00:32:19 -0000 Subject: [MacRuby] #988: Unable to get rack::basic::auth to function as demonstrated via sinatra page. Message-ID: <047.1e336cd9bdf16227a6b25c2beb5002be@macosforge.org> #988: Unable to get rack::basic::auth to function as demonstrated via sinatra page. ------------------------------+--------------------------------------------- Reporter: jhamor@? | Owner: joshua.ballanco@? Type: defect | Status: new Priority: critical | Milestone: Component: ControlTower | Keywords: ------------------------------+--------------------------------------------- While following the sinatra docs, i've tried all the possible combinations to get rack::basic::auth to function. When i use regular ruby-1.9 and sinatra 1.1.0 and rack 1.2.1, all seems well. When i switch back to macruby 0.7/controltower 1.0, i get a endless cycling of the basic authentication boxes and auth.credentials is some weird utf-8 string. Not really sure where to file this bug or what details are needed for reproduction, other than following the basic auth example for rack. Below works on ruby-1.9.2-p0/sinatra/rack: use Rack::Auth::Basic do |username, password| puts "user: #{username} pass: #{password}" username == 'admin' && password == 'secret' end Where this same example does not work on macruby/controltower. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 3 17:38:54 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 04 Nov 2010 00:38:54 -0000 Subject: [MacRuby] #849: MacRuby throws the exception of "Encoding::CompatibilityError" with various cases. In-Reply-To: <051.98d76f83714e71879164aaaa438b6d5c@macosforge.org> References: <051.98d76f83714e71879164aaaa438b6d5c@macosforge.org> Message-ID: <060.7ff66af7670d41bd226efc69d196818a@macosforge.org> #849: MacRuby throws the exception of "Encoding::CompatibilityError" with various cases. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by jhamor@?): I think this might be related to #988 but not sure. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 3 18:09:31 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 04 Nov 2010 01:09:31 -0000 Subject: [MacRuby] #984: strange scoping error in macirb In-Reply-To: <054.63e9a26ca26bcd2b8de4d8ae34658961@macosforge.org> References: <054.63e9a26ca26bcd2b8de4d8ae34658961@macosforge.org> Message-ID: <063.6a7b447c9b8da406ab1c94d4e32c518a@macosforge.org> #984: strange scoping error in macirb -------------------------------------+-------------------------------------- Reporter: mcowan@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: eval for-loop | -------------------------------------+-------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Should be fixed in r4876. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 3 18:28:50 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 04 Nov 2010 01:28:50 -0000 Subject: [MacRuby] #987: NSTask segfault In-Reply-To: <046.8a5023d1899e09a62279af5c738b978b@macosforge.org> References: <046.8a5023d1899e09a62279af5c738b978b@macosforge.org> Message-ID: <055.0bc0ffea088b9db84462c421090302ad@macosforge.org> #987: NSTask segfault -----------------------------+---------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: segfault NSTask -----------------------------+---------------------------------------------- Comment(by lsansonetti@?): {{{ (gdb) bt #0 create_intersected_charset_table [inlined] () at /Users/lrz/src /macruby-trunk/string.c:5157 #1 0x00000001000b826f in rstr_count (str=17191007168, sel=0x7fff86f4c4a8, argc=1884185952, argv=) at string.c:5226 #2 0x00007fff82ae1e8a in -[NSConcreteTask launchWithDictionary:] () #3 0x00007fff82aeb7f4 in +[NSTask launchedTaskWithLaunchPath:arguments:] () }}} It's crashing because the arguments: parameter is supposed to be an Array. Here, a RubyString is passed, so Cocoa tries to call #count on it. However, as #count is a core method, it can't be called from Objective-C. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 4 12:23:08 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 04 Nov 2010 19:23:08 -0000 Subject: [MacRuby] #989: external framework loading Message-ID: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> #989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- when loading an external framework, if the full path is not specified, the framework loads but with missing methods and discrepancies: what works: {{{ >> framework 'ObjCHiredis.framework' => true >> redis = ObjCHiredis.alloc.init => # >> redis.connect("127.0.0.1", on:6379) => 1 }}} what doesn't: {{{ >> framework 'ObjCHiredis' => true >> redis = ObjCHiredis.alloc.init => # >> redis.connect("127.0.0.1", on:6379) ArgumentError: wrong number of arguments (2 for 0) }}} basic cocoa and foundation framework have no problem though -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 4 13:12:01 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 04 Nov 2010 20:12:01 -0000 Subject: [MacRuby] #989: external framework loading In-Reply-To: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> References: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> Message-ID: <055.093f704f7e489227ad856cfbc3a4c9b5@macosforge.org> #989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lsansonetti@?): Where is ObjCHiredis.framework installed in this situation? #framework will pick up frameworks in ~/Library/Frameworks, /Library/Frameworks and /System/Library/Frameworks. If the ObjCHiredis.framework is copied in one of these locations, #framework should work as expected. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 4 13:35:00 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 04 Nov 2010 20:35:00 -0000 Subject: [MacRuby] #989: external framework loading In-Reply-To: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> References: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> Message-ID: <055.d98b7a732921ad69d3aa6264bcb91ec0@macosforge.org> #989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lsansonetti@?): From the list: my use case is one of TDD, where the framework is not installed but in the build folder. Even if I: ENV['DYLD_FRAMEWORK_PATH'] = ENV['BUILT_PRODUCTS_DIR'] the framework doesn't load properly. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 4 15:46:51 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 04 Nov 2010 22:46:51 -0000 Subject: [MacRuby] #989: external framework loading In-Reply-To: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> References: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> Message-ID: <055.127a2dd53b71807b14d045692a682504@macosforge.org> #989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lsansonetti@?): I grabbed the ObjCHiredis project from https://github.com/lp/ObjCHiredis, ran xcodebuild in the source directory, then did the following: {{{ $ cat t.rb framework "ObjCHiredis" p redis = ObjCHiredis.alloc.init p redis.connect("127.0.0.1", on:6379) $ DYLD_FRAMEWORK_PATH=build/Release /usr/local/bin/macruby t.rb # 2010-11-04 15:46:10.732 macruby[27012:607] Connection error: connect: Connection refused 0 }}} So, it seems to work for me. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 4 17:33:55 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 05 Nov 2010 00:33:55 -0000 Subject: [MacRuby] #989: external framework loading In-Reply-To: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> References: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> Message-ID: <055.def29a1b5e384cf6509a40629ac263f7@macosforge.org> #989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lp@?): I must have something wrong in my system: DYLD_FRAMEWORK_PATH=build/Debug /usr/local/bin/macruby t.rb # wrong number of arguments (2 for 0) (ArgumentError) and the DLYD_FRAMEWORK_PATH doesn't seem to change much in here: DYLD_FRAMEWORK_PATH=build/Anything /usr/local/bin/macruby t.rb # wrong number of arguments (2 for 0) (ArgumentError) I'm running from the release 0.7, will try a nightly build and report back. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 4 17:41:25 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 05 Nov 2010 00:41:25 -0000 Subject: [MacRuby] #989: external framework loading In-Reply-To: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> References: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> Message-ID: <055.042d8d1d42fba46ced6b04ef79899bac@macosforge.org> #989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lp@?): with the latest nightly: {{{ $ DYLD_FRAMEWORK_PATH=build/Debug /usr/local/bin/macruby t.rb # /Users/lpperron/Documents/lllaptop/git_repos/Redis/ObjCHiredis/ObjCHiredis/t.rb:3:in `
': wrong number of arguments (2 for 0) (ArgumentError) }}} I must have something wrong in my environment... build or execution? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 4 17:54:59 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 05 Nov 2010 00:54:59 -0000 Subject: [MacRuby] #989: external framework loading In-Reply-To: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> References: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> Message-ID: <055.99ff091006537322b5a2d2b3b318017a@macosforge.org> #989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lsansonetti@?): Could you verify that you don't have a bad version of ObjCHiredis.framework in the other locations? (~/Library/Frameworks, /Library/Frameworks and /System/Library/Frameworks) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 4 18:30:32 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 05 Nov 2010 01:30:32 -0000 Subject: [MacRuby] #989: external framework loading In-Reply-To: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> References: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> Message-ID: <055.4d67609964274e3397db8057d8d1bb85@macosforge.org> #989: external framework loading -----------------------------+---------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: framework external -----------------------------+---------------------------------------------- Comment(by lp@?): You're right Laurent! I had one in my local user Library... using it for a presentation I did about MacRuby at MTL.rb... Forgot to remove it and now it got in the way. D?sol? du temps perdu, c'?tait mon erreur... ?a fonctionne maintenant. I think this ticket is closed. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 4 19:08:53 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 05 Nov 2010 02:08:53 -0000 Subject: [MacRuby] #989: external framework loading In-Reply-To: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> References: <046.204383c19e039b9dbc170aac086fda12@macosforge.org> Message-ID: <055.65d9b292a30744de8f780e455ad21cfd@macosforge.org> #989: external framework loading --------------------------------+------------------------------------------- Reporter: lp@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: framework external | --------------------------------+------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => invalid Comment: Good to know that there is no bug in MacRuby :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 7 05:16:07 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 07 Nov 2010 13:16:07 -0000 Subject: [MacRuby] #990: Calling some CGContext functions raises 'instance variable __octype__ not initialized' warning Message-ID: <051.c5feff41c15dcdd2c916dfb0aa3eaef9@macosforge.org> #990: Calling some CGContext functions raises 'instance variable __octype__ not initialized' warning ----------------------------------+----------------------------------------- Reporter: sojastar07@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: CGContext warning unknown variable ----------------------------------+----------------------------------------- Running the following script will raise two 'instance variable __octype__ not initialized' warnings after calls to CGPDFContextCreateWithURL and to CGContextShowGlyphsAtPoint even though the __octype__ variable is never explicitly used in the script. --- framework 'Cocoa' url = CFURLCreateWithFileSystemPath(nil, './my_pfd.pdf', KCFURLPOSIXPathStyle, 0) page_rectangle_pointer = Pointer.new_with_type('{CGRect={CGPoint=dd}{CGSize=dd}}') page_rectangle_pointer[0] = NSMakeRect(0,0,100,100) pdf_context = CGPDFContextCreateWithURL(url, page_rectangle_pointer, nil) CGPDFContextBeginPage(pdf_context, nil) CGContextSelectFont(pdf_context, "TimesNewRomanPSMT", 11.0, KCGEncodingMacRoman) CGContextSetCMYKFillColor(pdf_context, 0.0, 0.0, 0.0, 1.0, 1.0) string = Pointer.new_with_type(:S, 4)[[BR]] string[0] = 68[[BR]] string[1] = 69[[BR]] string[2] = 70[[BR]] string[3] = 71[[BR]] CGContextShowGlyphsAtPoint(pdf_context, 25.0, 45.0, string, 4) CGPDFContextEndPage(pdf_context) CGPDFContextClose(pdf_context) --- Calling the script produces the following output : $ macruby -w cocoapdf.rb unknown: warning: instance variable __octype__ not initialized unknown: warning: instance variable __octype__ not initialized This is on 10.6.4 with MacRuby 0.7.1. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 7 11:45:59 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 07 Nov 2010 19:45:59 -0000 Subject: [MacRuby] #991: Regression bug when trying to create an array using arrayWithObjects Message-ID: <054.60db36f371cd4025a8086299368b9fc7@macosforge.org> #991: Regression bug when trying to create an array using arrayWithObjects -------------------------------------+-------------------------------------- Reporter: mattaimonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- {{{ NSArray.arrayWithObjects('so', 'say', 'we', 'all', nil) }}} {{{ NSMutableArray.arrayWithObjects('so', 'say', 'we', 'all', nil) }}} Here is the stack trace: {{{ Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000000000000e Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: objc[90559]: garbage collection is ON Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 com.apple.CoreFoundation 0x00007fff86579f84 __CFTypeCollectionRetain + 84 1 com.apple.CoreFoundation 0x00007fff86579b32 CFArrayCreate + 242 2 com.apple.CoreFoundation 0x00007fff865cefa6 -[__NSPlaceholderArray initWithObjects:count:] + 486 3 com.apple.CoreFoundation 0x00007fff865d0b21 +[NSArray arrayWithObjects:] + 465 4 ??? 0x0000000102d5a876 0 + 4342524022 5 libmacruby.dylib 0x0000000100145013 rb_vm_dispatch + 1331 6 ??? 0x0000000102d5a41c 0 + 4342522908 7 ??? 0x0000000102d5a0f5 0 + 4342522101 8 libmacruby.dylib 0x000000010015e013 rb_vm_run + 531 9 libmacruby.dylib 0x0000000100041040 ruby_run_node + 80 10 macruby 0x0000000100000d28 main + 152 11 macruby 0x0000000100000c88 start + 52 Thread 1: Dispatch queue: com.apple.libdispatch-manager 0 libSystem.B.dylib 0x00007fff87e4c08a kevent + 10 1 libSystem.B.dylib 0x00007fff87e4df5d _dispatch_mgr_invoke + 154 2 libSystem.B.dylib 0x00007fff87e4dc34 _dispatch_queue_invoke + 185 3 libSystem.B.dylib 0x00007fff87e4d75e _dispatch_worker_thread2 + 252 4 libSystem.B.dylib 0x00007fff87e4d088 _pthread_wqthread + 353 5 libSystem.B.dylib 0x00007fff87e4cf25 start_wqthread + 13 Thread 2: 0 libSystem.B.dylib 0x00007fff87e4ceaa __workq_kernreturn + 10 1 libSystem.B.dylib 0x00007fff87e4d2bc _pthread_wqthread + 917 2 libSystem.B.dylib 0x00007fff87e4cf25 start_wqthread + 13 Thread 3: 0 libSystem.B.dylib 0x00007fff87e4ceaa __workq_kernreturn + 10 1 libSystem.B.dylib 0x00007fff87e4d2bc _pthread_wqthread + 917 2 libSystem.B.dylib 0x00007fff87e4cf25 start_wqthread + 13 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x00007fff70d65280 rbx: 0x0000000000000005 rcx: 0x0000000000000000 rdx: 0x00007fff70d650a0 rdi: 0x00007fff70d96f20 rsi: 0x0000000000000005 rbp: 0x00007fff5fbfdd80 rsp: 0x00007fff5fbfdd70 r8: 0x0000000100d002d0 r9: 0x0000000000000000 r10: 0x0000000000000001 r11: 0x0000000100bc5000 r12: 0x000000000000000d r13: 0x00007fff5fbfde38 r14: 0x0000000000000003 r15: 0x00007fff70d96f20 rip: 0x00007fff86579f84 rfl: 0x0000000000010246 cr2: 0x000000000000000e Binary Images: 0x100000000 - 0x100000ff7 +macruby ??? (???) <4F6FD196-A580-58BD-7894-5F37ACDB5851> /usr/local/bin/macruby 0x100003000 - 0x100b00f3f +libmacruby.dylib 0.8.0 (compatibility 0.8.0) /Library/Frameworks/MacRuby.framework/Versions/0.8/usr/lib/libmacruby.dylib 0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) /usr/lib/dyld 0x7fff80042000 - 0x7fff800d2fff com.apple.SearchKit 1.3.0 (1.3.0) <4175DC31-1506-228A-08FD-C704AC9DF642> /System/Library/ }}} The above examples used to work and were reported broken by one of my book's readers using v0.7. I was able to reproduce with 0.8 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 7 14:50:36 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 07 Nov 2010 22:50:36 -0000 Subject: [MacRuby] #991: Regression bug when trying to create an array using arrayWithObjects In-Reply-To: <054.60db36f371cd4025a8086299368b9fc7@macosforge.org> References: <054.60db36f371cd4025a8086299368b9fc7@macosforge.org> Message-ID: <063.9bc7e9e0aba321a017c21bb164cc3bda@macosforge.org> #991: Regression bug when trying to create an array using arrayWithObjects -------------------------------------+-------------------------------------- Reporter: mattaimonetti@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: | -------------------------------------+-------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => invalid * milestone: MacRuby 0.8 => Comment: You need to do `framework 'Foundation'' before using Foundation APIs. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 7 22:07:33 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 08 Nov 2010 06:07:33 -0000 Subject: [MacRuby] #992: dynamic string in thread, in block causing a segfault Message-ID: <054.8f1f1b47d5dc8b1b2d2d753fb2c08070@macosforge.org> #992: dynamic string in thread, in block causing a segfault -------------------------------------+-------------------------------------- Reporter: mattaimonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- The following code triggers a segfault: {{{ def slow_operation(n); end n = 10 ths = [] 10.times do |n| ths << Thread.new{slow_operation("thread #{n}")} end; ths.each{|t| t.join} }}} Renaming or removing the n variable fixes the problem. Offline Laurent said: You build a dynamic string "thread #{n}" inside a thread. n refers to the block dvar or, at one point, we leave the times loop before the thread starts to use the variable -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 8 12:54:04 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 08 Nov 2010 20:54:04 -0000 Subject: [MacRuby] #993: Assertion failure : vm.cpp Message-ID: <056.1504f5e433f0c262e365ec8606058e54@macosforge.org> #993: Assertion failure : vm.cpp ---------------------------------------+------------------------------------ Reporter: hungerandthirst@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: gems, bundler, deps ---------------------------------------+------------------------------------ no idea where this comes from but when trying to use bundler to manage gem deps in a macruby app like so require "rubygems" require "bundler/setup" I get the following: Assertion failed: ((size_t)pos < current_exceptions.size()), function pop_current_exception, file vm.cpp, line 3370. If I remove the 'require bundler/setup' line, it works fine. Using 7.1 release. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 8 14:04:35 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 08 Nov 2010 22:04:35 -0000 Subject: [MacRuby] #990: Calling some CGContext functions raises 'instance variable __octype__ not initialized' warning In-Reply-To: <051.c5feff41c15dcdd2c916dfb0aa3eaef9@macosforge.org> References: <051.c5feff41c15dcdd2c916dfb0aa3eaef9@macosforge.org> Message-ID: <060.2dcf261a1ff79432975bcd4f922ca015@macosforge.org> #990: Calling some CGContext functions raises 'instance variable __octype__ not initialized' warning ------------------------------------------------+--------------------------- Reporter: sojastar07@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: CGContext warning unknown variable | ------------------------------------------------+--------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Should be fixed in r4896. BTW, as of trunk, Pointer.new(:S) will no longer work, as symbols can only be used for FFI shortcuts (such as :bool, :id, :class & so on). So, you will need to do Pointer.new('S') instead. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 9 20:14:45 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 10 Nov 2010 04:14:45 -0000 Subject: [MacRuby] #994: Grit gem acts differently in macruby vs macruby app Message-ID: <056.4c4ec18e70cc0423cc13672ffb67f888@macosforge.org> #994: Grit gem acts differently in macruby vs macruby app ---------------------------------------+------------------------------------ Reporter: hungerandthirst@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.7 Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ I'm trying to integrate the grit gem into a macruby app. If I try to create a Repo object and then do Grit::Status.new(repo) on the object, it claims all the objects in the repo are unversioned/untracked. However if I run the exact same code in macirb or place the code and run via macruby, it returns the correct status on the repo. Using MacRuby 7.1 release. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 10 11:37:06 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 10 Nov 2010 19:37:06 -0000 Subject: [MacRuby] #995: NoMethodError for initialization on MacRuby but works fine on CRuby Message-ID: <053.d985e4956a5e539b4a4c1e1031f1e0ff@macosforge.org> #995: NoMethodError for initialization on MacRuby but works fine on CRuby ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- When using the jiraSOAP gem (version 0.4.0) and I try to create a new JIRA::JIRAService object with #new I always get a NoMethodError on MacRuby, but when I run the gem in CRuby the initialization works fine. The source for the gem is on github at github.com/Marketcircle/jiraSOAP -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 14 07:20:06 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 14 Nov 2010 15:20:06 -0000 Subject: [MacRuby] #996: Missing Proc#source_location leads to incomplete Kernel#caller backtraces Message-ID: <058.7e28c7ec75a3d897e652c0042dbf4339@macosforge.org> #996: Missing Proc#source_location leads to incomplete Kernel#caller backtraces -----------------------------------------+---------------------------------- Reporter: martijn@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: -----------------------------------------+---------------------------------- I'm trying to use RSpec (latest version, 2.1.0) with MacRuby nightly, but there is information missing from the exception backtraces which makes it difficult to see where exactly specs fail. The issue is that RSpec uses instance_eval with a Proc object to execute an example. In Ruby 1.9.2, Procs include their source_location, an Array consisting of the file name and line number of the code represented by the Proc. This source_location (or actually it's underlying implementation) is used by Ruby 1.9.2 to generate Kernel#caller backtraces for code executed from a Proc. MacRuby however, doesn't implement Proc#source_location (I checked proc.c and compared it to the Ruby 1.9.2 version) and hence Kernel#caller output doesn't show backtraces for code executed from a Proc. RubySpec contains a failing core/proc/source_location_spec.rb which might help in implementing this feature. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 14 17:28:44 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 15 Nov 2010 01:28:44 -0000 Subject: [MacRuby] #997: FIxnum.new gives a strange error on MacRuby Message-ID: <053.b59d73d0e14482295927c4a945023203@macosforge.org> #997: FIxnum.new gives a strange error on MacRuby ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- With Ruby 1.9.2 I am told that Fixnum does not have a method called #new, but MacRuby is telling me that I am passing the wrong number of arguments. irb(main):002:0> Fixnum.new ArgumentError: wrong number of arguments (0 for 0) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 14 17:37:33 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 15 Nov 2010 01:37:33 -0000 Subject: [MacRuby] #978: macirb gives a weird error when I dereference a pointer to a CFArray In-Reply-To: <053.442d94c2f80fc787f02c8171a445ec53@macosforge.org> References: <053.442d94c2f80fc787f02c8171a445ec53@macosforge.org> Message-ID: <062.4166a4ed1335c6148709bfa9b9e3392a@macosforge.org> #978: macirb gives a weird error when I dereference a pointer to a CFArray ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: macirb error ------------------------------------+--------------------------------------- Comment(by mrada@?): I am not having this issue with the nightly builds of MacRuby 0.8 that I have been using. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 16 12:36:08 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 16 Nov 2010 20:36:08 -0000 Subject: [MacRuby] #998: MacRuby does not compile on Mac OS X Leopard Message-ID: <048.8ee207f71382231447abcdb9cfce9465@macosforge.org> #998: MacRuby does not compile on Mac OS X Leopard -------------------------------+-------------------------------------------- Reporter: napau@? | Owner: lsansonetti@? Type: defect | Status: new Priority: trivial | Milestone: Component: MacRuby | Keywords: compile MacRuby-0.6 -------------------------------+-------------------------------------------- Hello, trying to compile MacRuby ends with the following message: (See full trace by running task with --trace) Macintosh-662:bin np$ rake jobs=2 --trace (in /Users/Shared/MacRuby-0.6) ** Invoke default (first_time) ** Invoke all (first_time) ** Invoke macruby (first_time) ** Invoke macruby:build (first_time) ** Invoke macruby:dylib (first_time) ** Invoke rbconfig (first_time) ** Invoke miniruby (first_time) ** Invoke objects (first_time) ** Invoke config_h (first_time) ** Execute config_h ** Invoke dtrace_h (first_time) ** Execute dtrace_h ** Invoke revision_h (first_time) ** Execute revision_h ** Invoke mark_gc (first_time) ** Execute mark_gc ** Execute objects /usr/bin/ruby tool/compile_prelude.rb prelude.rb miniprelude.c.new /usr/bin/gcc-4.2 -I. -I./include -I/usr/include/libxml2 -arch i386 -arch x86_64 -fno-common -pipe -O3 -g -Wall -fexceptions -Wno-parentheses -Wno- deprecated-declarations -Werror -std=c99 -I./icu-1060 -c array.c -o array.o /usr/bin/gcc-4.2 -I. -I./include -I/usr/include/libxml2 -arch i386 -arch x86_64 -fno-common -pipe -O3 -g -Wall -fexceptions -Wno-parentheses -Wno- deprecated-declarations -Werror -std=c99 -I./icu-1060 -c bignum.c -o bignum.o rake aborted! Command failed with status (127): [/usr/bin/gcc-4.2 -I. -I./include -I/usr/in...] /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:719:in `sh' /Users/Shared/MacRuby-0.6/rakelib/builder/builder.rb:33:in `join' /Users/Shared/MacRuby-0.6/rakelib/builder/builder.rb:33:in `parallel_execute' /Users/Shared/MacRuby-0.6/rakelib/builder/builder.rb:27:in `each' As far as I can see rake catches the "wrong" Ruby. I was not able to switch this off. My OS is 10.5.8 Macine is Mac Mini. LLVM compiled properly and is installed. Regards Norbert -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 16 17:21:52 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 01:21:52 -0000 Subject: [MacRuby] #998: MacRuby does not compile on Mac OS X Leopard In-Reply-To: <048.8ee207f71382231447abcdb9cfce9465@macosforge.org> References: <048.8ee207f71382231447abcdb9cfce9465@macosforge.org> Message-ID: <057.07a955fa532a4a82b2f5371c10eece17@macosforge.org> #998: MacRuby does not compile on Mac OS X Leopard -------------------------------+-------------------------------------------- Reporter: napau@? | Owner: lsansonetti@? Type: defect | Status: new Priority: trivial | Milestone: Component: MacRuby | Keywords: compile MacRuby-0.6 -------------------------------+-------------------------------------------- Comment(by watson1978@?): Unfortunately, Mac OS X 10.5 is not supported :'( Please see #805. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 16 17:46:17 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 01:46:17 -0000 Subject: [MacRuby] #995: NoMethodError for initialization on MacRuby but works fine on CRuby In-Reply-To: <053.d985e4956a5e539b4a4c1e1031f1e0ff@macosforge.org> References: <053.d985e4956a5e539b4a4c1e1031f1e0ff@macosforge.org> Message-ID: <062.0aee5da9567c40961c7c66a8dace4fbe@macosforge.org> #995: NoMethodError for initialization on MacRuby but works fine on CRuby ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@?): So it turns out the problem is occurring because I call super from my #initialization method (JIRA::JIRAService) and there is no #initialization in the parent class (Handsoap::Service). Once I remove this call, which I don't really need, everything works. However, if I try out a simple example that should reproduce this problem nothing bad happens (code executes fine). At this point, what is happening is beyond my current understanding of Ruby. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 17 02:21:51 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 10:21:51 -0000 Subject: [MacRuby] #999: Handle Obj-C protocols better in MacRuby Message-ID: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> #999: Handle Obj-C protocols better in MacRuby ----------------------------------------+----------------------------------- Reporter: martinlagardette@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- MacRuby should be able to handle Protocols better. As of r4916, protocols can not really be used, because the `Protocol` class crashes. We should probably find a way so that Objects can define what protocols they conforms to. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 17 02:23:19 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 10:23:19 -0000 Subject: [MacRuby] #998: MacRuby does not compile on Mac OS X Leopard In-Reply-To: <048.8ee207f71382231447abcdb9cfce9465@macosforge.org> References: <048.8ee207f71382231447abcdb9cfce9465@macosforge.org> Message-ID: <057.97564783c0af62e5a51f7f6b10a7c932@macosforge.org> #998: MacRuby does not compile on Mac OS X Leopard ---------------------------------+------------------------------------------ Reporter: napau@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: trivial | Milestone: Component: MacRuby | Resolution: wontfix Keywords: compile MacRuby-0.6 | ---------------------------------+------------------------------------------ Changes (by martinlagardette@?): * status: new => closed * resolution: => wontfix Comment: Just like Watson said, 10.5 is not supported anymore, sorry for that. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 17 02:26:07 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 10:26:07 -0000 Subject: [MacRuby] #999: Handle Obj-C protocols better in MacRuby In-Reply-To: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> References: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> Message-ID: <066.d95bd5879ccad532b79b5ee9b854a099@macosforge.org> #999: Handle Obj-C protocols better in MacRuby ----------------------------------------+----------------------------------- Reporter: martinlagardette@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by martinlagardette@?): Attached is a patch that will: - Remove the NSInvocation warnings when using `Protocol#protocolWithName` - Make this work: `someObj.conformsToProtocol(Protocol.protocolWithName("NSCoding"))` -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 17 08:50:35 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 16:50:35 -0000 Subject: [MacRuby] #1000: Xcode fails to load bridgesupport file automatically for user created framework Message-ID: <051.d61c843c78e8b2070b9a1e50a00ba464@macosforge.org> #1000: Xcode fails to load bridgesupport file automatically for user created framework ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: bridgesupport ----------------------------------+----------------------------------------- When linking to a framework that includes a bridgesupport file, it is necessary to explicitly call 'load_bridge_support_file' with the path to the file. Included is a very simple framework that defines one class (TestBlock) with one method: - (void)callBlock:(void (^)())block; If the framework is included in a project it is possible to create a 'TestBlock' object within macruby, but calling the method 'callBlock', will fail. eg b = TestBlock.new b.callBlock( Proc.new {puts "hello from ruby"} ) #fails The code will succeed if 'load_bridge_support_file' is used first. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 17 09:25:02 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 17:25:02 -0000 Subject: [MacRuby] #1000: Xcode fails to load bridgesupport file automatically for user created framework In-Reply-To: <051.d61c843c78e8b2070b9a1e50a00ba464@macosforge.org> References: <051.d61c843c78e8b2070b9a1e50a00ba464@macosforge.org> Message-ID: <060.08421ceb47eb62e750e6e917fdf6fc69@macosforge.org> #1000: Xcode fails to load bridgesupport file automatically for user created framework ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: bridgesupport | ----------------------------------+----------------------------------------- Changes (by mattaimonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: {{{ $ macirb --simple-prompt >> framework File.expand_path('BlockFrameworkTest.framework') => true >> b = TestBlock.new => # >> b.callBlock Proc.new{puts 'hello world'} 2010-11-17 09:22:22.922 macruby[26072:903] block: <__NSStackBlock__: 0x7fff5fbf8e20> hello world => # >> MACRUBY_VERSION => "0.8" >> MACRUBY_REVISION => "git commit f2e31918601eb80aed8b9ee59625865d46e13db7" }}} I'm on trunk and as you can see, it's working fine here. Can you try to install a nightly build and give it a spin? Thanks, - Matt -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 17 12:23:04 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 20:23:04 -0000 Subject: [MacRuby] #1001: All future significant numbers should be novelty tickets Message-ID: <056.9fa26fa4a32f58c1e28c3dc47c8b293d@macosforge.org> #1001: All future significant numbers should be novelty tickets ---------------------------------------+------------------------------------ Reporter: joshua.ballanco@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ **SUMMARY** When a "nice big round number", like #1000, #5000, #42, etc. is approaching in the trac system of assigning bug numbers, this number should be used for a "novelty ticket" **STEPS TO REPRODUCE** 1. Wait approximately a year and a half for the next "nice big round number" to come around. By my calculations this should be ticket #2000. 2. Have Thibault file ticket #1999. 3. Wait for Thibault to NOT notice that the next ticket is a "nice big round number". 4. Wait for Eloy to suggest to a user on the mailing list that they should file a ticket, also NOT noticing that the next ticket is a "nice big round number". 5. Wait for said user to file a ticket and ACTUALLY notice that said ticket is a "nice big round number", but still file a "real" ticket. **REGRESSION** This has been happening since ticket #1000. **NOTES** It seems that when this bug occurs, Matt is inclined to make half-hearted and mostly-unfunny jokes about the situation. Hopefully, if the original issue is fixed then this other issue will disappear as well. If not, we may need a separate issue for Matt's jokes. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 17 12:24:53 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 20:24:53 -0000 Subject: [MacRuby] #1001: All future significant numbers should be novelty tickets In-Reply-To: <056.9fa26fa4a32f58c1e28c3dc47c8b293d@macosforge.org> References: <056.9fa26fa4a32f58c1e28c3dc47c8b293d@macosforge.org> Message-ID: <065.0d5e76bbd847cef9e044bd8d7826eaea@macosforge.org> #1001: All future significant numbers should be novelty tickets ---------------------------------------+------------------------------------ Reporter: joshua.ballanco@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Old description: > **SUMMARY** > When a "nice big round number", like #1000, #5000, #42, etc. is > approaching in the trac system of assigning bug numbers, this number > should be used for a "novelty ticket" > > **STEPS TO REPRODUCE** > 1. Wait approximately a year and a half for the next "nice big round > number" to come around. By my calculations this should be ticket #2000. > 2. Have Thibault file ticket #1999. > 3. Wait for Thibault to NOT notice that the next ticket is a "nice big > round number". > 4. Wait for Eloy to suggest to a user on the mailing list that they > should file a ticket, also NOT noticing that the next ticket is a "nice > big round number". > 5. Wait for said user to file a ticket and ACTUALLY notice that said > ticket is a "nice big round number", but still file a "real" ticket. > > **REGRESSION** > This has been happening since ticket #1000. > > **NOTES** > It seems that when this bug occurs, Matt is inclined to make half-hearted > and mostly-unfunny jokes about the situation. Hopefully, if the original > issue is fixed then this other issue will disappear as well. If not, we > may need a separate issue for Matt's jokes. New description: **SUMMARY** When a "nice big round number", like #1000, #5000, #42, etc. is approaching in the trac system of assigning bug numbers, this number should be used for a "novelty ticket" **STEPS TO REPRODUCE** 1. Wait approximately a year and a half for the next "nice big round number" to come around. By my calculations this should be ticket #2000. 2. Have Thibault file ticket #1999. 3. Wait for Thibault to NOT notice that the next ticket is a "nice big round number". 4. Wait for Eloy to suggest to a user on the mailing list that they should file a ticket, also NOT noticing that the next ticket is a "nice big round number". 5. Wait for said user to file a ticket and ACTUALLY notice that said ticket is a "nice big round number", but still file a "real" ticket. **REGRESSION** This has been happening since ticket #1000. **NOTES** It seems that when this bug occurs, Matt is inclined to make half-hearted and mostly-unfunny jokes about the situation. Hopefully, if the original issue is fixed then this other issue will disappear as well. If not, we may need a separate issue for Matt's jokes. -- Comment(by joshua.ballanco@?): Also, trac really should learn how to handle newlines... -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 17 13:50:07 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 21:50:07 -0000 Subject: [MacRuby] #1000: Xcode fails to load bridgesupport file automatically for user created framework In-Reply-To: <051.d61c843c78e8b2070b9a1e50a00ba464@macosforge.org> References: <051.d61c843c78e8b2070b9a1e50a00ba464@macosforge.org> Message-ID: <060.d6eb41569a6a6424ba019a7d023fa257@macosforge.org> #1000: Xcode fails to load bridgesupport file automatically for user created framework ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: bridgesupport | ----------------------------------+----------------------------------------- Old description: > When linking to a framework that includes a bridgesupport file, it is > necessary to explicitly call 'load_bridge_support_file' with the path to > the file. > > Included is a very simple framework that defines one class (TestBlock) > with one method: > > - (void)callBlock:(void (^)())block; > > If the framework is included in a project it is possible to create a > 'TestBlock' object within macruby, but calling the method 'callBlock', > will fail. eg > > b = TestBlock.new > b.callBlock( Proc.new {puts "hello from ruby"} ) #fails > > The code will succeed if 'load_bridge_support_file' is used first. New description: When linking to a framework that includes a bridgesupport file, it is necessary to explicitly call 'load_bridge_support_file' with the path to the file. Included is a very simple framework that defines one class (TestBlock) with one method: {{{ - (void)callBlock:(void (^)())block; }}} If the framework is included in a project it is possible to create a 'TestBlock' object within macruby, but calling the method 'callBlock', will fail. eg {{{ b = TestBlock.new b.callBlock( Proc.new {puts "hello from ruby"} ) #fails }}} The code will succeed if 'load_bridge_support_file' is used first. -- Comment(by martinlagardette@?): Same here: {{{ $> macirb --simple-prompt >> framework './BlockFrameworkTest.framework' => true >> b = TestBlock.new => # >> b.callBlock Proc.new { puts 42 } 2010-11-17 22:49:16.031 macruby[9858:903] block: <__NSStackBlock__: 0x7fff5fbf8350> 42 => # >> MACRUBY_VERSION => "0.8" >> MACRUBY_REVISION => "svn revision 4894 from http://svn.macosforge.org/repository/ruby/MacRuby/trunk" >> }}} What version of MacRuby are you using? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 17 14:30:02 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 17 Nov 2010 22:30:02 -0000 Subject: [MacRuby] #1002: AXUIElement functions won't accept Pointers of type :id Message-ID: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> #1002: AXUIElement functions won't accept Pointers of type :id ---------------------------+------------------------------------------------ Reporter: haxie1@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: ---------------------------+------------------------------------------------ I am working with the Carbon Accessibility API and running into an issue with Pointers. {{{ framework 'ApplicationServices' pid = (Safari's pid) safari = AXUIElementCreateApplication(pid) titlePtr = Pointer.new(:id) err = AXUIElementCopyAttributeValue(safari, "AXTitle", titlePtr) }}} error: TypeError: expected instance of Pointer of type `^v', got `@' Passing: {{{ ... titlePtr = Pointer.new("^v") err = AXUIElementCopyAttributeValue(safari, "AXTitle", titlePtr) }}} returns successfully but titlePtr is nil. Since AXUIElementCopyAttributeValue takes a pointer to a CFTypeRef, shouldn't I be able to pass a Pointer of type :id? I am running the latest MacRuby nightly and have BridgeSupportPreview1 installed. Regards, Kam -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Nov 19 07:08:16 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 19 Nov 2010 15:08:16 -0000 Subject: [MacRuby] #1003: Copied Proc objects cause crash when used as Objective-C blocks Message-ID: <051.cb982a4897121f27d101149962f311d2@macosforge.org> #1003: Copied Proc objects cause crash when used as Objective-C blocks ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Objective-C objects which copy a C block to invoke later can cause a crash/error when used in macruby. The Objective-C code is as follows (also attached as a framework): {{{ #import @interface TestBlock : NSObject { void (^block)(void); } - (id)initWithBlock:(void (^)())aBlock; - (void)callBlock; @end #import "TestBlock.h" @implementation TestBlock - (id)initWithBlock:(void (^)())aBlock; { if ((self = [super init])) { block = [aBlock copy]; NSLog(@"Block: %@", block); block(); } return self; } - (void)callBlock; { NSLog(@"block: %@", block); block(); } @end }}} The following code will work if saved in an .rb file and called from Macruby. However the same code in Macirb will fail. {{{ framework File.expand_path('BlockFrameworkTest.framework') b = TestBlock.alloc.initWithBlock Proc.new { puts "hello"} b.callBlock }}} Also included is a small Xcode project that shows that the code fails when invoked from macruby, but not from objective-c. My guess is that when the object is initialized and the 'callBlock' method are invoked within the same iteration of the run loop, then the error doesn't occur. If the 'callBlock' method call occurs in a later run loop iteration, the error will occur. But that's a guess. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Nov 19 07:21:22 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 19 Nov 2010 15:21:22 -0000 Subject: [MacRuby] #1003: Copied Proc objects cause crash when used as Objective-C blocks In-Reply-To: <051.cb982a4897121f27d101149962f311d2@macosforge.org> References: <051.cb982a4897121f27d101149962f311d2@macosforge.org> Message-ID: <060.45fc4240b82ad200719775b8ae7fc5b8@macosforge.org> #1003: Copied Proc objects cause crash when used as Objective-C blocks ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by al_skipp@?): I was unable to attach the Xcode project, as the file size exceeded the upload limit. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Nov 19 09:55:56 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 19 Nov 2010 17:55:56 -0000 Subject: [MacRuby] #1003: Copied Proc objects cause crash when used as Objective-C blocks In-Reply-To: <051.cb982a4897121f27d101149962f311d2@macosforge.org> References: <051.cb982a4897121f27d101149962f311d2@macosforge.org> Message-ID: <060.a52a2a055220ed9b4f06f905cac88e68@macosforge.org> #1003: Copied Proc objects cause crash when used as Objective-C blocks ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by al_skipp@?): Xcode project now attached. Will need to manually relink to the 'BlockFramework.framework' to get it to build. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Nov 20 03:01:05 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 20 Nov 2010 11:01:05 -0000 Subject: [MacRuby] #1003: Copied Proc objects cause crash when used as Objective-C blocks In-Reply-To: <051.cb982a4897121f27d101149962f311d2@macosforge.org> References: <051.cb982a4897121f27d101149962f311d2@macosforge.org> Message-ID: <060.121226d9683c07d13abf54059b839094@macosforge.org> #1003: Copied Proc objects cause crash when used as Objective-C blocks ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by martinlagardette@?): That's just a guess, but I think MacRuby is creating the wrong type of block: {{{ ## Objective-C block 2010-11-20 11:58:46.104 CallObjectiveCBlocks[44528:a0f] Block: <__NSGlobalBlock__: 0x100001240> ## Ruby block 2010-11-20 11:58:46.111 CallObjectiveCBlocks[44528:a0f] Block: <__NSAutoBlock__: 0x2009e7620> }}} It may be that auto means "auto-released", in which case it would be the reason. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Nov 20 09:25:15 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 20 Nov 2010 17:25:15 -0000 Subject: [MacRuby] #1003: Copied Proc objects cause crash when used as Objective-C blocks In-Reply-To: <051.cb982a4897121f27d101149962f311d2@macosforge.org> References: <051.cb982a4897121f27d101149962f311d2@macosforge.org> Message-ID: <060.f7ae53c9136d02b84da1bd15a30637c6@macosforge.org> #1003: Copied Proc objects cause crash when used as Objective-C blocks ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by martinlagardette@?): More specifically: {{{ ## Objective-C # block argument to initWithBlock 2010-11-20 18:23:43.047 CallObjectiveCBlocks[47405:a0f] [initWithBlock:] aBlock: <__NSGlobalBlock__: 0x100001240> # Copied block 2010-11-20 18:23:43.050 CallObjectiveCBlocks[47405:a0f] [initWithBlock:] block: <__NSGlobalBlock__: 0x100001240> ## Ruby # block argument to initWithBlock 2010-11-20 18:23:43.055 CallObjectiveCBlocks[47405:a0f] [initWithBlock:] aBlock: <__NSStackBlock__: 0x7fff5fbfd400> # Copied block 2010-11-20 18:23:43.056 CallObjectiveCBlocks[47405:a0f] [initWithBlock:] block: <__NSAutoBlock__: 0x200bedf80> }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Nov 20 14:10:30 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 20 Nov 2010 22:10:30 -0000 Subject: [MacRuby] #1004: warnings when running macirb Message-ID: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> #1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- When I start up macirb, or execute any commands in it, I get warnings. Here's an example: irb(main):005:0> ''.methods.size ''.methods.size unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized unknown: warning: instance variable @terminate not initialized unknown: warning: instance variable @syntax_error not initialized => 169 unknown: warning: instance variable @in_string not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized irb(main):006:0> As far as I have tested, it works anyway, but it continues to get those warnings each time I execute a command. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 21 00:32:57 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 21 Nov 2010 08:32:57 -0000 Subject: [MacRuby] #999: Handle Obj-C protocols better in MacRuby In-Reply-To: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> References: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> Message-ID: <066.e9a577da8db8bc5651fa7b84e4c84fdd@macosforge.org> #999: Handle Obj-C protocols better in MacRuby ----------------------------------------+----------------------------------- Reporter: martinlagardette@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by lsansonetti@?): Please commit :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 21 17:42:39 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 22 Nov 2010 01:42:39 -0000 Subject: [MacRuby] #999: Handle Obj-C protocols better in MacRuby In-Reply-To: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> References: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> Message-ID: <066.c5a8e1a9f3df02f36fc88c15439dd0b5@macosforge.org> #999: Handle Obj-C protocols better in MacRuby ----------------------------------------+----------------------------------- Reporter: martinlagardette@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by lsansonetti@?): I think this patch will not allow ruby classes to declare protocols they conform to, yet. I guess we would need to introduce an API for this. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 21 17:47:12 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 22 Nov 2010 01:47:12 -0000 Subject: [MacRuby] #999: Handle Obj-C protocols better in MacRuby In-Reply-To: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> References: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> Message-ID: <066.d1b8c133d361ddf16ff5d063373ce98e@macosforge.org> #999: Handle Obj-C protocols better in MacRuby ----------------------------------------+----------------------------------- Reporter: martinlagardette@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by lsansonetti@?): Looks like the class_addProtocol() runtime function could be used. I wonder if we can call it automatically, once all methods of a known protocol are defined. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 21 18:49:10 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 22 Nov 2010 02:49:10 -0000 Subject: [MacRuby] #1000: Xcode fails to load bridgesupport file automatically for user created framework In-Reply-To: <051.d61c843c78e8b2070b9a1e50a00ba464@macosforge.org> References: <051.d61c843c78e8b2070b9a1e50a00ba464@macosforge.org> Message-ID: <060.f1abb0258388a5e7bea4201275494726@macosforge.org> #1000: Xcode fails to load bridgesupport file automatically for user created framework ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: bridgesupport | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: closed => reopened * resolution: fixed => * milestone: MacRuby 0.8 => Comment: Re-opening. I believe MacRuby should find the frameworks linked into the main executable and appropriately load their bridgesupport files if necessary. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 21 20:23:25 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 22 Nov 2010 04:23:25 -0000 Subject: [MacRuby] #943: tab completion of files crashes macirb In-Reply-To: <053.63c7423da9e4a50a50485b232d562dab@macosforge.org> References: <053.63c7423da9e4a50a50485b232d562dab@macosforge.org> Message-ID: <062.4df3e43587de35e36ce903467ed9cf6a@macosforge.org> #943: tab completion of files crashes macirb -----------------------------------------+---------------------------------- Reporter: mrada@? | Owner: eloy.de.enige@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: macirb crash tab completion | -----------------------------------------+---------------------------------- Comment(by mrada@?): I am no longer experiencing crashes when trying to tab complete with nightly builds of MacRuby. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 21 22:37:53 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 22 Nov 2010 06:37:53 -0000 Subject: [MacRuby] #1000: Xcode fails to load bridgesupport file automatically for user created framework In-Reply-To: <051.d61c843c78e8b2070b9a1e50a00ba464@macosforge.org> References: <051.d61c843c78e8b2070b9a1e50a00ba464@macosforge.org> Message-ID: <060.1aa62f3d11feafd43801d2a6490961f9@macosforge.org> #1000: Xcode fails to load bridgesupport file automatically for user created framework ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: bridgesupport | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: reopened => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Should be fixed in r4926. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 21 23:26:33 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 22 Nov 2010 07:26:33 -0000 Subject: [MacRuby] #999: Handle Obj-C protocols better in MacRuby In-Reply-To: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> References: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> Message-ID: <066.81e38406b05978abc755483966631e76@macosforge.org> #999: Handle Obj-C protocols better in MacRuby ----------------------------------------+----------------------------------- Reporter: martinlagardette@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by martinlagardette@?): Replying to [comment:3 lsansonetti@?]: > I think this patch will not allow ruby classes to declare protocols they conform to, yet. I guess we would need to introduce an API for this. Yep, it won't. It will just "crash less" when using with +protocolWithName :-) Replying to [comment:4 lsansonetti@?]: > Looks like the class_addProtocol() runtime function could be used. I wonder if we can call it automatically, once all methods of a known protocol are defined. Well, that's what I thought too. I wanted to see if I could fix this bug by using the runtime, but the main problem I stumbled upon is that I don't know where we could list the protocols a class conforms to? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 22 01:29:51 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 22 Nov 2010 09:29:51 -0000 Subject: [MacRuby] #999: Handle Obj-C protocols better in MacRuby In-Reply-To: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> References: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> Message-ID: <066.eae06906e2a8ee7cbf7cec7b6e00970f@macosforge.org> #999: Handle Obj-C protocols better in MacRuby ----------------------------------------+----------------------------------- Reporter: martinlagardette@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by martijn@?): Replying to [comment:4 lsansonetti@?]: > Looks like the class_addProtocol() runtime function could be used. I wonder if we can call it automatically, once all methods of a known protocol are defined. To me, it feels there might be too much 'magic' in automatically adding protocols a class conforms to. Plus, there are plenty of protocols with no required but only optional methods. Would all MacRuby classes then automatically conform to these protocols? I don't mind manually indicating what protocols a class supports, as this helps make explicit what its responsibilities are. So what about just adding a class macro that calls class_addProtocol() during class definition? {{{ #!ruby class SourceListController add_protocol :NSOutlineViewDelegate def outlineView(outlineView, child:index, ofItem:item) ... end ... end }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 22 12:18:49 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 22 Nov 2010 20:18:49 -0000 Subject: [MacRuby] #1005: How could macrubyd be used to debug a Cocoa app? Message-ID: <047.f1d9bbec4ad5d394a5fd122da37d73b7@macosforge.org> #1005: How could macrubyd be used to debug a Cocoa app? ------------------------------+--------------------------------------------- Reporter: rap@? | Owner: lsansonetti@? Type: task | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: macrubyd ------------------------------+--------------------------------------------- I'm looking for a way to use macrubyd with a Cocoa app. Is there a way? I understand that macrubyd does not integrate with XCode like GDB, and that I won't be able to click on a line in a source editor to set a breakpoint, or interactively click around in a data inspector. I'm just looking for any way, no matter how rough, to break a Cocoa app's execution at a certain point and then interact with a macrubyd session. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 22 15:09:23 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 22 Nov 2010 23:09:23 -0000 Subject: [MacRuby] #999: Handle Obj-C protocols better in MacRuby In-Reply-To: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> References: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> Message-ID: <066.433b0402f3af1eed4983e0c1fbeec82b@macosforge.org> #999: Handle Obj-C protocols better in MacRuby ----------------------------------------+----------------------------------- Reporter: martinlagardette@? | Owner: lsansonetti@? Type: enhancement | Status: closed Priority: major | Milestone: Component: MacRuby | Resolution: fixed Keywords: 0.8 | ----------------------------------------+----------------------------------- Changes (by eloy.de.enige@?): * keywords: => 0.8 * status: new => closed * resolution: => fixed Comment: After some more discussion we decided to override conformsToProtocol: on RubyObject, the superclass of all pure Ruby classes. This implementation will check if the object/class implements the required protocol methods. This has been committed in r4930, please give it a try (or the next nightly). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 22 15:35:31 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 22 Nov 2010 23:35:31 -0000 Subject: [MacRuby] #999: Handle Obj-C protocols better in MacRuby In-Reply-To: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> References: <057.a74103ffe2ef9d0fc61fa08876556b62@macosforge.org> Message-ID: <066.8f58a95c53966bd82dad574bbb078a66@macosforge.org> #999: Handle Obj-C protocols better in MacRuby ----------------------------------------+----------------------------------- Reporter: martinlagardette@? | Owner: lsansonetti@? Type: enhancement | Status: closed Priority: major | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------------+----------------------------------- Changes (by eloy.de.enige@?): * keywords: 0.8 => * milestone: => MacRuby 0.8 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 22 17:45:53 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 23 Nov 2010 01:45:53 -0000 Subject: [MacRuby] #1006: rake clean target is now missing intermediate build results Message-ID: <044.e6373bf66ff8b310e7167ae5a6a2b3bd@macosforge.org> #1006: rake clean target is now missing intermediate build results ---------------------------+------------------------------------------------ Reporter: jkh@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: ---------------------------+------------------------------------------------ For awhile now, svn status has been reporting a lot of extraneous files left behind after a rake clean (on trunk). Looks like the clean target in MacRuby's Rakefile(s) need to be updated to encompass: ? ext/digest/sha2/lib/sha2.rbo ? ext/digest/lib/digest.rbo ? ext/digest/lib/digest/hmac.rbo ? ext/bigdecimal/lib/bigdecimal/ludcmp.rbo ? ext/bigdecimal/lib/bigdecimal/jacobian.rbo ? ext/bigdecimal/lib/bigdecimal/math.rbo ? ext/bigdecimal/lib/bigdecimal/newton.rbo ? ext/bigdecimal/lib/bigdecimal/util.rbo ? ext/pty/lib/expect.rbo ? ext/nkf/lib/kconv.rbo ? ext/openssl/lib/openssl.rbo ? ext/openssl/lib/openssl/bn.rbo ? ext/openssl/lib/openssl/ssl.rbo ? ext/openssl/lib/openssl/x509.rbo ? ext/openssl/lib/openssl/buffering.rbo ? ext/openssl/lib/openssl/cipher.rbo ? ext/openssl/lib/openssl/ssl-internal.rbo ? ext/openssl/lib/openssl/x509-internal.rbo ? ext/openssl/lib/openssl/digest.rbo ? ext/ripper/lib/ripper.rbo ? ext/ripper/lib/ripper/lexer.rbo ? ext/ripper/lib/ripper/sexp.rbo ? ext/ripper/lib/ripper/filter.rbo ? ext/ripper/lib/ripper/core.rbo ? ext/io/wait/lib/nonblock.rbo -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 22 18:26:21 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 23 Nov 2010 02:26:21 -0000 Subject: [MacRuby] #1006: rake clean target is now missing intermediate build results In-Reply-To: <044.e6373bf66ff8b310e7167ae5a6a2b3bd@macosforge.org> References: <044.e6373bf66ff8b310e7167ae5a6a2b3bd@macosforge.org> Message-ID: <053.a829257a1199d5ce163f754d91420fc4@macosforge.org> #1006: rake clean target is now missing intermediate build results ---------------------------+------------------------------------------------ Reporter: jkh@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------+------------------------------------------------ Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed Comment: Should be fixed in r4936. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 22 18:32:20 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 23 Nov 2010 02:32:20 -0000 Subject: [MacRuby] #1004: warnings when running macirb In-Reply-To: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> References: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> Message-ID: <058.fec79949eb93b00b8eed1fa29572182c@macosforge.org> #1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Description changed by lsansonetti@?: Old description: > When I start up macirb, or execute any commands in it, I get warnings. > Here's an example: > > irb(main):005:0> ''.methods.size > ''.methods.size > unknown: warning: instance variable @in_regexp not initialized > unknown: warning: instance variable @in_array not initialized > unknown: warning: instance variable @terminate not initialized > unknown: warning: instance variable @syntax_error not initialized > => 169 > unknown: warning: instance variable @in_string not initialized > unknown: warning: instance variable @in_regexp not initialized > unknown: warning: instance variable @in_array not initialized > irb(main):006:0> > > As far as I have tested, it works anyway, but it continues to get those > warnings each time I execute a command. New description: When I start up macirb, or execute any commands in it, I get warnings. Here's an example: {{{ irb(main):005:0> ''.methods.size ''.methods.size unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized unknown: warning: instance variable @terminate not initialized unknown: warning: instance variable @syntax_error not initialized => 169 unknown: warning: instance variable @in_string not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized irb(main):006:0> }}} As far as I have tested, it works anyway, but it continues to get those warnings each time I execute a command. -- -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 22 18:33:18 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 23 Nov 2010 02:33:18 -0000 Subject: [MacRuby] #1004: warnings when running macirb In-Reply-To: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> References: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> Message-ID: <058.83c40e7d82912af7ec34663aa30c0c9c@macosforge.org> #1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by lsansonetti@?): I can reproduce this by enabling warnings when running macirb. {{{ $ RUBYOPT=-w /usr/local/bin/macirb irb(main):001:0> ''.methods unknown: warning: instance variable @in_string not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized unknown: warning: instance variable @terminate not initialized unknown: warning: instance variable @syntax_error not initialized => [:encode!, :encode, :__stored_in_uchars__?, :__getchar__, :__chars_count__, :transform, :crypt, :rpartition, :partition, :sum, :tr_s!, :tr_s, :tr!, :tr, :squeeze!, :squeeze, :delete!, :delete, :count, :reverse!, :reverse, :upto, :next!, :next, :succ!, :succ, :each_codepoint, :codepoints, :each_byte, :bytes, :each_char, :chars, :each_line, :lines, :rstrip!, :lstrip!, :strip!, :rstrip, :lstrip, :strip, :center, :rjust, :ljust, :capitalize!, :capitalize, :swapcase!, :swapcase, :upcase!, :upcase, :downcase!, :downcase, :gsub!, :gsub, :sub!, :sub, :chop!, :chop, :chomp!, :chomp, :to_f, :chr, :ord, :oct, :hex, :to_i, :split, :scan, :=~, :match, :dump, :inspect, :intern, :to_sym, :to_str, :to_s, :end_with?, :start_with?, :include?, :eql?, :casecmp, :<=>, :==, :concat, :<<, :%, :*, :+, :rindex, :index, :insert, :slice!, :slice, :[]=, :[], :ascii_only?, :valid_encoding?, :force_encoding, :pointer, :to_data, :setbyte, :getbyte, :bytesize, :empty?, :size, :encoding, :clear, :replace, :clone, :dup, :to_c, :to_r, :unpack, :>, :>=, :<, :<=, :between?, :clear_history!, :h!, :history!, :h, :history, :to_plist, :Complex, :Rational, :callcc, :enum_for, :to_enum, :object_id, :__id__, :define_singleton_method, :public_method, :method, :extend, :respond_to_missing?, :respond_to?, :public_send, :send, :__send__, :instance_exec, :instance_eval, :__callee__, :__method__, :tap, :is_a?, :kind_of?, :instance_of?, :instance_variable_defined?, :instance_variable_set, :instance_variable_get, :instance_variables, :public_methods, :private_methods, :protected_methods, :singleton_methods, :methods, :untrusted?, :untrust, :trust, :frozen?, :freeze, :untaint, :tainted?, :taint, :__type__, :!~, :===, :nil?, :!=, :!, :equal?] unknown: warning: instance variable @in_string not initialized unknown: warning: instance variable @in_regexp not initialized unknown: warning: instance variable @in_array not initialized }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 22 18:39:29 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 23 Nov 2010 02:39:29 -0000 Subject: [MacRuby] #1004: warnings when running macirb In-Reply-To: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> References: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> Message-ID: <058.f920d19f308683162e2d7a5f1bc9d24f@macosforge.org> #1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Changes (by lsansonetti@?): * owner: lsansonetti@? => eloy.de.enige@? Comment: Problem is in lib/irb/source.rb, line 75. {{{ @code_block = !parse.nil? && !@in_string && !@in_regexp && !@in_array }}} These ivars have not been created yet, and if used in a conditional as is with warnings enabled, a warning will be raised. I verified with a similar snippet with MRI. {{{ $ ruby -e 'foo=!@foo&&!@bar' $ ruby -w -e 'foo=!@foo&&!@bar' -e:1: warning: instance variable @foo not initialized -e:1: warning: instance variable @bar not initialized }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 23 10:22:25 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 23 Nov 2010 18:22:25 -0000 Subject: =?utf-8?b?W01hY1J1YnldICMxMDA3OiDigJxFWENfQkFEX0FDQ0VTU+KAnSB3?= =?utf-8?q?hen_trying_to_generate_Json?= Message-ID: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> #1007: ?EXC_BAD_ACCESS? when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Hi Guys, When I try to generate json from the enclosed file I get a bad access error. If you require any other information please let me know. Thanks, Josh -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 23 11:03:28 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 23 Nov 2010 19:03:28 -0000 Subject: =?utf-8?b?UmU6IFtNYWNSdWJ5XSAjMTAwNzog4oCcRVhDX0JBRF9BQ0NFU1M=?= =?utf-8?q?=E2=80=9D_when_trying_to_generate_Json?= In-Reply-To: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> References: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> Message-ID: <065.0b381b3ec295e740231b431500535c5e@macosforge.org> #1007: ?EXC_BAD_ACCESS? when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: minor | Milestone: Component: MacRuby | Resolution: invalid Keywords: | ---------------------------------------+------------------------------------ Changes (by mattaimonetti@?): * status: new => closed * resolution: => invalid Comment: Thanks for the bug report. I just tried with a recent version of trunk and got the following: {{{ SON.parse File.read(File.expand_path('~/Desktop/json_issue.txt')) JSON::ParseError: lexical error: invalid char in json text. [{"drmVersionNumber"=>0, "itemId"=>318926433, "soft (right here) ------^ }}} Then I looked at the file and realized it was really not a json file. You can check with http://www.jsonlint.com/ but your file looks like an inspected version of a Ruby object. I'm closing this ticket since 1) I can't reproduce the EXC_BAD_ACCESS error on trunk and 2) the file isn't a valid json file. If I missed your point, please feel free to reopen this ticket or provide more information. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 23 11:25:32 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 23 Nov 2010 19:25:32 -0000 Subject: =?utf-8?b?UmU6IFtNYWNSdWJ5XSAjMTAwNzog4oCcRVhDX0JBRF9BQ0NFU1M=?= =?utf-8?q?=E2=80=9D_when_trying_to_generate_Json?= In-Reply-To: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> References: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> Message-ID: <065.bd0d6623425a344dc5971981ea3045ef@macosforge.org> #1007: ?EXC_BAD_ACCESS? when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: minor | Milestone: Component: MacRuby | Resolution: invalid Keywords: | ---------------------------------------+------------------------------------ Comment(by josh.kalderimis@?): Hi Matt, Thanks for the quick reply. I think I might not have explained myself correctly. I am passing a ruby hash to JSON.generate which is then blowing up. I am not trying to parse JSON but instead create JSON. Thank a bundle, Josh -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 23 11:29:50 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 23 Nov 2010 19:29:50 -0000 Subject: =?utf-8?b?UmU6IFtNYWNSdWJ5XSAjMTAwNzog4oCcRVhDX0JBRF9BQ0NFU1M=?= =?utf-8?q?=E2=80=9D_when_trying_to_generate_Json?= In-Reply-To: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> References: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> Message-ID: <065.fb3570643c50c39ecc726acda9a0b77b@macosforge.org> #1007: ?EXC_BAD_ACCESS? when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | ---------------------------------------+------------------------------------ Changes (by mattaimonetti@?): * status: closed => reopened * resolution: invalid => -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 24 00:44:15 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 24 Nov 2010 08:44:15 -0000 Subject: =?utf-8?b?UmU6IFtNYWNSdWJ5XSAjMTAwNzog4oCcRVhDX0JBRF9BQ0NFU1M=?= =?utf-8?q?=E2=80=9D_when_trying_to_generate_Json?= In-Reply-To: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> References: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> Message-ID: <065.a905b2f740abc312d3f90a4dd7ceaa54@macosforge.org> #1007: ?EXC_BAD_ACCESS? when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | ---------------------------------------+------------------------------------ Comment(by josh.kalderimis@?): I just wanted to add a quick note to say that the included ruby data structure in the file is a hash of data extracted from a group of plist files. The dates haven't serialized correctly, but if it helps I should be able to share the code which generates the error. Thanks Josh -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 24 01:12:23 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 24 Nov 2010 09:12:23 -0000 Subject: [MacRuby] #1004: warnings when running macirb In-Reply-To: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> References: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> Message-ID: <058.d066421aa60cfcffe019b713e29d6b94@macosforge.org> #1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by eloy.de.enige@?): I really dislike pre-defining instance variables unless really necessary, but obviously this gets annoying if you run it with warnings enabled. I'll fix this tonight. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 24 12:44:02 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 24 Nov 2010 20:44:02 -0000 Subject: [MacRuby] #1004: warnings when running macirb In-Reply-To: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> References: <049.93646c0b235676b3e6ea1a1619a59f3a@macosforge.org> Message-ID: <058.09232dd4b4686bee0dd4f6c1d7f0a1bb@macosforge.org> #1004: warnings when running macirb --------------------------------+------------------------------------------- Reporter: mhmstuff@? | Owner: eloy.de.enige@? Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by eloy.de.enige@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Got rid of all warnings I found, in r4945. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 24 13:11:21 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 24 Nov 2010 21:11:21 -0000 Subject: [MacRuby] #1008: Can't get the last line from $_. Need to implement rb_lastline_get and rb_lastline_set. Message-ID: <051.2d53efe2ca1e3d1d96594566ee7c266b@macosforge.org> #1008: Can't get the last line from $_. Need to implement rb_lastline_get and rb_lastline_set. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby require 'tempfile' t = Tempfile.new("foo") t.puts "1" t.puts "2" t.puts "3" t.close def test(io) io.gets p $_ end io = File.open(t.path) io.gets p $_ io.gets test(io) p $_ }}} Result: {{{ $ ruby19 -v t.rb ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0] "1\n" "3\n" "2\n" $ macruby -v t.rb MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] nil nil nil }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 24 13:18:37 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 24 Nov 2010 21:18:37 -0000 Subject: [MacRuby] #1009: Can't set status of taint and untrust to Float Object. Message-ID: <051.06dee1a89c29416cfae37127c5ff7a56@macosforge.org> #1009: Can't set status of taint and untrust to Float Object. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby f = 5.5 f.taint f.untrust f.freeze p f.class p f.tainted? p f.untrusted? p f.frozen? }}} Result: {{{ $ ruby19 -v tt.rb ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0] Float true true true $ macruby -v tt.rb MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] Float false false true }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 24 19:56:32 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 03:56:32 -0000 Subject: =?utf-8?b?UmU6IFtNYWNSdWJ5XSAjMTAwNzog4oCcRVhDX0JBRF9BQ0NFU1M=?= =?utf-8?q?=E2=80=9D_when_trying_to_generate_Json?= In-Reply-To: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> References: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> Message-ID: <065.f10ed0fe2839ce94fab6841558006d20@macosforge.org> #1007: ?EXC_BAD_ACCESS? when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | ---------------------------------------+------------------------------------ Comment(by mattaimonetti@?): Josh, I removed the not serialized timestamps and the unicode characters that I couldn't eval properly. Once that done, I was able to parse the code, create an object and generate a JSON version of it. I'm attaching the file I used to test, please confirm that it works for you. Also, test your code with Ruby 1.9 and make sure that everything works as expected. If you could reduce the problem to a smaller, easier to reproduce example, that would be very helpful. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Nov 24 20:01:43 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 04:01:43 -0000 Subject: =?utf-8?b?UmU6IFtNYWNSdWJ5XSAjMTAwNzog4oCcRVhDX0JBRF9BQ0NFU1M=?= =?utf-8?q?=E2=80=9D_when_trying_to_generate_Json?= In-Reply-To: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> References: <056.a658408105fa6c4c069ca1be675374b6@macosforge.org> Message-ID: <065.aaf0a7490dfef8a973d1668c05d7568c@macosforge.org> #1007: ?EXC_BAD_ACCESS? when trying to generate Json ---------------------------------------+------------------------------------ Reporter: josh.kalderimis@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: minor | Milestone: Component: MacRuby | Resolution: invalid Keywords: | ---------------------------------------+------------------------------------ Changes (by mattaimonetti@?): * status: reopened => closed * resolution: => invalid Comment: Josh, I'm closing this ticket for now. I'll reopen it when you provide us with a bug reduction. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 25 00:09:37 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 08:09:37 -0000 Subject: [MacRuby] #382: undefined constants in Snow Leopard In-Reply-To: <049.ff9f578b42afb76b146b9b4fdde012b2@macosforge.org> References: <049.ff9f578b42afb76b146b9b4fdde012b2@macosforge.org> Message-ID: <058.767d3bc1b079305ea5179ca01a240fce@macosforge.org> #382: undefined constants in Snow Leopard --------------------------------+------------------------------------------- Reporter: rich@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by mattaimonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Closing this ticket since everything seems to be working fine, especially with the new BridgeSupport -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 25 00:16:15 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 08:16:15 -0000 Subject: [MacRuby] #422: Kernel#caller compatibilty In-Reply-To: <054.79ee52ac0beed7942aee00c351aef393@macosforge.org> References: <054.79ee52ac0beed7942aee00c351aef393@macosforge.org> Message-ID: <063.98794625b09861a67b6b94091e6f9a44@macosforge.org> #422: Kernel#caller compatibilty -------------------------------------+-------------------------------------- Reporter: mattaimonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Old description: > In a file: > > {{{ > class Foo > def self.bar > puts caller(1) > end > end > > Foo.bar > }}} > > macruby: > {{{ > core:in `caller:' > simple_caller.rb:3:in `bar' > simple_caller.rb:7:in `
' > }}} > > ruby1.9: > {{{ > simple_caller.rb:7:in `
' > }}} > > A tiny bit more advanced example: > > {{{ > class Foo > def self.bar > baz do > puts caller(1) > end > end > > def self.baz(&block) > block.call > end > end > > Foo.bar > }}} > > macruby: > > {{{ > core:in `caller:' > caller_proc.rb:9:in `baz' > caller_proc.rb:3:in `bar' > caller_proc.rb:13:in `
' > }}} > > ruby1.9: > > {{{ > caller_proc.rb:9:in `call' > caller_proc.rb:9:in `baz' > caller_proc.rb:3:in `bar' > caller_proc.rb:13:in `
> }}} > > Files attached. New description: In a file: Example: {{{ class Foo def self.bar baz do puts caller(1) end end def self.baz(&block) block.call end end Foo.bar }}} macruby: {{{ core:in `caller:' caller_proc.rb:9:in `baz' caller_proc.rb:3:in `bar' caller_proc.rb:13:in `
' }}} ruby1.9: {{{ caller_proc.rb:9:in `call' caller_proc.rb:9:in `baz' caller_proc.rb:3:in `bar' caller_proc.rb:13:in `
}}} Files attached. -- Comment(by mattaimonetti@?): The first example now works fine, block calls still don't get listed in the caller list so I'm leaving this ticket open. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 25 00:30:52 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 08:30:52 -0000 Subject: [MacRuby] #513: MacRuby gets confused about inheritance under certain conditions In-Reply-To: <052.4f7a875b0656b0aa0bc3d052a078068b@macosforge.org> References: <052.4f7a875b0656b0aa0bc3d052a078068b@macosforge.org> Message-ID: <061.92733a249a7ce9449239611bd38c6d5f@macosforge.org> #513: MacRuby gets confused about inheritance under certain conditions -----------------------------------+---------------------------------------- Reporter: matthew@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by mattaimonetti@?): still valid as of today -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 25 00:37:38 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 08:37:38 -0000 Subject: [MacRuby] #520: Confusion in data type names for Core OpenGL In-Reply-To: <051.ba69c40e9ac692084fb38724a2a43ed7@macosforge.org> References: <051.ba69c40e9ac692084fb38724a2a43ed7@macosforge.org> Message-ID: <060.3499016cd434c88ff97bb135783bea30@macosforge.org> #520: Confusion in data type names for Core OpenGL ------------------------------------------------------+--------------------- Reporter: sojastar07@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: pointer Core OpenGL data types confusion | ------------------------------------------------------+--------------------- Changes (by mattaimonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: This bug seems to have been solved in the new BridgeSupport preview, please reopen if needs be. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 25 03:35:55 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 11:35:55 -0000 Subject: [MacRuby] #849: MacRuby throws the exception of "Encoding::CompatibilityError" with various cases. In-Reply-To: <051.98d76f83714e71879164aaaa438b6d5c@macosforge.org> References: <051.98d76f83714e71879164aaaa438b6d5c@macosforge.org> Message-ID: <060.82f3144d093d07c093e3c2f4685d4251@macosforge.org> #849: MacRuby throws the exception of "Encoding::CompatibilityError" with various cases. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): MacRuby does not support Script Encoding now.[[BR]] And can't check validity of Encoding definitely. I think better that MacRuby does not check Encoding, till issues are fixed. It is very likely that the script which stopped by this issue comes to work. {{{ #!diff diff --git a/string.c b/string.c index c224d7f..407ad62 100644 --- a/string.c +++ b/string.c @@ -165,6 +165,11 @@ str_invert_byte_order(rb_str_t *self) static rb_encoding_t * str_compatible_encoding(rb_str_t *str1, rb_str_t *str2) { + // TODO : #742, #849 + // MacRuby does not support Script Encoding now. + // So, can't check validity of Encoding definitely. + return rb_encodings[ENCODING_UTF8]; +#if 0 if (str1->encoding == str2->encoding) { return str1->encoding; } @@ -182,6 +187,7 @@ str_compatible_encoding(rb_str_t *str1, rb_str_t *str2) return str1->encoding; } return NULL; +#endif } static rb_encoding_t * }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 25 04:15:28 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 12:15:28 -0000 Subject: [MacRuby] #1010: NSPoint/CGpoint =>NaN Message-ID: <055.92a4a99d76e134da14f1c421f336d964@macosforge.org> #1010: NSPoint/CGpoint =>NaN --------------------------------------+------------------------------------- Reporter: zalavariandris@? | Owner: lsansonetti@? Type: defect | Status: new Priority: trivial | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: NSPoint, CGPoint, 32Bit, NaN, NSEVent --------------------------------------+------------------------------------- NSEvent.mouseLocation result in an NSPoint without the corresponding values. I have the same bug when getting the position of a CALayer. irb(main):003:0> NSEvent.mouseLocation => # irb(main):007:0> layer=CALayer.new => # irb(main):008:0> layer.position => # Macruby 0.8 | Ruby 1.9.2 MacOSX 01.6.5 (32bit ) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 25 04:50:36 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 12:50:36 -0000 Subject: [MacRuby] #1010: NSPoint/CGpoint =>NaN In-Reply-To: <055.92a4a99d76e134da14f1c421f336d964@macosforge.org> References: <055.92a4a99d76e134da14f1c421f336d964@macosforge.org> Message-ID: <064.73ad191275482fd70e9c5f98112676d3@macosforge.org> #1010: NSPoint/CGpoint =>NaN --------------------------------------+------------------------------------- Reporter: zalavariandris@? | Owner: lsansonetti@? Type: defect | Status: new Priority: trivial | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: NSPoint, CGPoint, 32Bit, NaN, NSEVent --------------------------------------+------------------------------------- Old description: > NSEvent.mouseLocation result in an NSPoint without the corresponding > values. I have the same bug when getting the position of a CALayer. > > irb(main):003:0> NSEvent.mouseLocation > => # > > irb(main):007:0> layer=CALayer.new > => # > irb(main):008:0> layer.position > => # > > Macruby 0.8 | Ruby 1.9.2 > MacOSX 01.6.5 (32bit ) New description: NSEvent.mouseLocation result in an NSPoint without the corresponding values. I have the same bug when getting the position of a CALayer. {{{ irb(main):003:0> NSEvent.mouseLocation => # irb(main):007:0> layer=CALayer.new => # irb(main):008:0> layer.position => # }}} Macruby 0.8 | Ruby 1.9.2 MacOSX 01.6.5 (32bit ) -- Comment(by martinlagardette@?): From a comment from a closed bug: {{{ $> arch -i386 macruby -e 'framework "Cocoa"; p NSMakeSize(400, 400)' }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 25 09:48:11 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 17:48:11 -0000 Subject: [MacRuby] #1011: Sinatra fails silently on MacRuby 0.8 nightly builds Message-ID: <053.f0987a6ab9c4b5e0ef3971b685f4b890@macosforge.org> #1011: Sinatra fails silently on MacRuby 0.8 nightly builds ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Trying to run the 'Hello, world' example from the Sinatra website does not seem to work on MacRuby. However, when I try the example in macirb it does work! I can even get the Control Tower Sinatra example to work. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 25 09:57:20 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 17:57:20 -0000 Subject: [MacRuby] #1002: AXUIElement functions won't accept Pointers of type :id In-Reply-To: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> References: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> Message-ID: <053.8919bf46a17a34a7f72503e7c75fa209@macosforge.org> #1002: AXUIElement functions won't accept Pointers of type :id ---------------------------+------------------------------------------------ Reporter: haxie1@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: ---------------------------+------------------------------------------------ Comment(by mrada@?): I've been playing with the Accessibility APIs a lot lately as well. The problem is that right now MacRuby doesn't support void pointers (http://ofps.oreilly.com/titles/9781449380373/ch02.html#_pointers). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Nov 25 14:46:45 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 25 Nov 2010 22:46:45 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour Message-ID: <060.8b5171358fa817295eb45181fef04380@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------------------+-------------------------------- I've been trying to use Ruby's built in Net::IMAP but haven't got beyond the first hurdle. require 'net/imap' imap = Net::IMAP.new("imap.gmail.com", 25, false) // crashes with 'can't convert nil into String (TypeError)' I've traced it to an inconsistency in the Regex handling between vanilla Ruby and MacRuby (tested on the latest nightly build of 0.8 as of the 25th of November): $ macruby --version MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] $ macruby regex-test.rb 0 '220' versus $ ruby --version ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] $ ruby regex-test.rb 0 '220' 3 ' ' 4 'mx.google.com' 17 ' ' 18 'ESMTP' 23 ' ' 24 'n40sm3793094weq.29' -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Nov 26 01:06:18 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 26 Nov 2010 09:06:18 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.22dd73db15a48e7dda5fd0db27b4cec9@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------------------+-------------------------------- Description changed by martinlagardette@?: Old description: > I've been trying to use Ruby's built in Net::IMAP but haven't got beyond > the first hurdle. > > require 'net/imap' > imap = Net::IMAP.new("imap.gmail.com", 25, false) // crashes with 'can't > convert nil into String (TypeError)' > > I've traced it to an inconsistency in the Regex handling between vanilla > Ruby and MacRuby (tested on the latest nightly build of 0.8 as of the > 25th of November): > > $ macruby --version > MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] > $ macruby regex-test.rb > 0 '220' > > versus > > $ ruby --version > ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] > $ ruby regex-test.rb > 0 '220' > 3 ' ' > 4 'mx.google.com' > 17 ' ' > 18 'ESMTP' > 23 ' ' > 24 'n40sm3793094weq.29' New description: I've been trying to use Ruby's built in Net::IMAP but haven't got beyond the first hurdle. {{{ #!ruby require 'net/imap' imap = Net::IMAP.new("imap.gmail.com", 25, false) # crashes with 'can't convert nil into String (TypeError)' }}} I've traced it to an inconsistency in the Regex handling between vanilla Ruby and MacRuby (tested on the latest nightly build of 0.8 as of the 25th of November): {{{ $ macruby --version MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] $ macruby regex-test.rb 0 '220' }}} versus {{{ $ ruby --version ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] $ ruby regex-test.rb 0 '220' 3 ' ' 4 'mx.google.com' 17 ' ' 18 'ESMTP' 23 ' ' 24 'n40sm3793094weq.29' }}} -- -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Nov 26 01:34:48 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 26 Nov 2010 09:34:48 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.733fa53c174e44dc1107218dac47d986@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------------------+-------------------------------- Comment(by watson1978@?): It seems that handling of Regexp's ?G is broken. {{{ #!ruby str = "123456789" str.scan(/\G\d\d\d/) {|m| p m } }}} {{{ $ ruby t.rb "123" "456" "789" $ macruby t.rb "123" }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Nov 26 12:54:31 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 26 Nov 2010 20:54:31 -0000 Subject: [MacRuby] #1010: NSPoint/CGpoint =>NaN In-Reply-To: <055.92a4a99d76e134da14f1c421f336d964@macosforge.org> References: <055.92a4a99d76e134da14f1c421f336d964@macosforge.org> Message-ID: <064.350f60dd9718e7b2c9fb2b8081825d6f@macosforge.org> #1010: NSPoint/CGpoint =>NaN --------------------------------------+------------------------------------- Reporter: zalavariandris@? | Owner: lsansonetti@? Type: defect | Status: new Priority: trivial | Milestone: Component: MacRuby | Keywords: NSPoint, CGPoint, 32Bit, NaN, NSEVent --------------------------------------+------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.8 => Comment: Indeed: {{{ $ ./miniruby -e "framework 'Cocoa'; p NSEvent.mouseLocation" # $ arch -i386 ./miniruby -e "framework 'Cocoa'; p NSEvent.mouseLocation" # }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Nov 26 13:12:31 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 26 Nov 2010 21:12:31 -0000 Subject: [MacRuby] #1010: NSPoint/CGpoint =>NaN In-Reply-To: <055.92a4a99d76e134da14f1c421f336d964@macosforge.org> References: <055.92a4a99d76e134da14f1c421f336d964@macosforge.org> Message-ID: <064.bdfd40846c1bea68b115d158b8a7c12d@macosforge.org> #1010: NSPoint/CGpoint =>NaN --------------------------------------+------------------------------------- Reporter: zalavariandris@? | Owner: lsansonetti@? Type: defect | Status: new Priority: trivial | Milestone: Component: MacRuby | Keywords: NSPoint, CGPoint, 32Bit, NaN, NSEVent --------------------------------------+------------------------------------- Comment(by lsansonetti@?): Looks like yet another 32-bit ABI issue. The IR code we emit: {{{ %1 = type { float, float } define i32 @1(i8*, i32, i8*, i32, i32*) { EntryBlock: %5 = bitcast i8* %0 to %1 (i32, i8*)* ; <%1 (i32, i8*)*> [#uses=1] %6 = tail call %1 %5(i32 %1, i8* %2) ; <%1> [#uses=2] %7 = extractvalue %1 %6, 0 ; [#uses=1] %8 = tail call i32 @vm_float_to_rval(float %7) ; [#uses=1] %9 = extractvalue %1 %6, 1 ; [#uses=1] %10 = tail call i32 @vm_float_to_rval(float %9) ; [#uses=1] %11 = tail call i32 (i32, i32, ...)* @rb_vm_new_struct(i32 36883328, i32 2, i32 %8, i32 %10) ; [#uses=1] ret i32 %11 } }}} IR code emitted by llvm-gcc for a similar expression: {{{ %struct._NSPoint = type { float, float } %1 = alloca %struct._NSPoint ; <%struct._NSPoint*> [#uses=3] %6 = call i64 bitcast (%struct.objc_object* (%struct.objc_object*, %struct.objc_selector*, ...)* @objc_msgSend to i64 (%struct.objc_object*, %struct.objc_selector*)*)(%struct.objc_object* %5, %struct.objc_selector* %4) nounwind ; [#uses=1] %7 = bitcast %struct._NSPoint* %1 to i64* ; [#uses=1] store i64 %6, i64* %7, align 4 }}} llvm-gcc seems to return the NSPoint struct into a 64-bit integer. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Nov 26 14:07:31 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 26 Nov 2010 22:07:31 -0000 Subject: [MacRuby] #1010: NSPoint/CGpoint =>NaN In-Reply-To: <055.92a4a99d76e134da14f1c421f336d964@macosforge.org> References: <055.92a4a99d76e134da14f1c421f336d964@macosforge.org> Message-ID: <064.f6f79547bbe4fba59b7a32893f6d2dfe@macosforge.org> #1010: NSPoint/CGpoint =>NaN ---------------------------------------------------+------------------------ Reporter: zalavariandris@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: trivial | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: NSPoint, CGPoint, 32Bit, NaN, NSEVent | ---------------------------------------------------+------------------------ Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Should be fixed in r4952. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Nov 27 02:01:54 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 27 Nov 2010 10:01:54 -0000 Subject: [MacRuby] #1013: Segmentation fault when using readline Message-ID: <047.9ea611660c3ee3df88e424c34a2febba@macosforge.org> #1013: Segmentation fault when using readline ------------------------------+--------------------------------------------- Reporter: pelsen@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.7 Component: MacRuby | Keywords: ------------------------------+--------------------------------------------- Dear MacRuby Developers, When messing aound with MacRuby, I tried readline, but whenever I use it it exits, saying "Segmentation fault". I don't think that's good :). I am running Mac OS X on a Mac Mini, uname -a output: Darwin Brutus.local 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386 macirb --version output: DietRB (0.5.1) macruby --version output: MacRuby 0.7 (ruby 1.9.2) [universal-darwin10.0, x86_64] How to reproduce: Brutus:~ patrick$ macirb irb(main):001:0> readline Segmentation fault Brutus:~ patrick$ -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Nov 27 14:07:23 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 27 Nov 2010 22:07:23 -0000 Subject: [MacRuby] #1013: Segmentation fault when using readline In-Reply-To: <047.9ea611660c3ee3df88e424c34a2febba@macosforge.org> References: <047.9ea611660c3ee3df88e424c34a2febba@macosforge.org> Message-ID: <056.22aa4582001ffe0ed37f56a16248855e@macosforge.org> #1013: Segmentation fault when using readline ------------------------------+--------------------------------------------- Reporter: pelsen@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.7 Component: MacRuby | Keywords: ------------------------------+--------------------------------------------- Comment(by lsansonetti@?): backtrace: {{{ (gdb) bt #0 0x0000000100049bda in argf_next_argv (argf=17184158528) at io.c:3311 #1 0x000000010004c202 in argf_readline (argf=17184158528, sel=, argc=0, argv=0x0) at io.c:3516 #2 0x00000001001396c5 in rb_vm_dispatch (_vm=0x100b0e040, cache=0x100aa0f80, top=17184158528, self=17184158528, klass=0x40030a000, sel=0x10213c090, block=0x0, opt=1 '\001', argc=0, argv=0x0) at dispatcher.cpp:448 #3 0x000000010015e93f in rb_vm_call0 [inlined] () at /Users/lrz/src /macruby-trunk/vm.h:603 #4 0x000000010015e93f in RoxorInterpreter::interpret_call (this=0x10217b470, call=) at vm.h:279 #5 0x000000010015f16a in RoxorInterpreter::interpret_instruction (this=0x10217b470, insn=0x100bbe6f0) at interpreter.cpp:176 #6 0x000000010015f3b4 in RoxorInterpreter::interpret_basicblock (this=0x10217b470, bb=0x100bbe120) at interpreter.cpp:272 #7 0x000000010015efa6 in RoxorInterpreter::interpret_instruction (this=0x10217b470, insn=0x100bbe1b0) at interpreter.cpp:160 #8 0x000000010015f3b4 in RoxorInterpreter::interpret_basicblock (this=0x10217b470, bb=0x100bbdee0) at interpreter.cpp:272 #9 0x0000000100151456 in rb_vm_run (fname=0x4004c0680 "-e", node=0x4004c1580, binding=0x0, inside_eval=false) at vm.cpp:3889 #10 0x000000010002fd10 in ruby_run_node (n=0x4004c1580) at eval.c:211 #11 0x0000000100000cf8 in main (argc=5, argv=0x100b070c0, envp=) at main.cpp:40 }}} Note: this is about IO#readline, not libreadline. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Nov 27 14:09:54 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 27 Nov 2010 22:09:54 -0000 Subject: [MacRuby] #1013: Segmentation fault when using readline In-Reply-To: <047.9ea611660c3ee3df88e424c34a2febba@macosforge.org> References: <047.9ea611660c3ee3df88e424c34a2febba@macosforge.org> Message-ID: <056.752ae649e8ba7994a55bc1c02901e564@macosforge.org> #1013: Segmentation fault when using readline ------------------------------+--------------------------------------------- Reporter: pelsen@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------+--------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby 0.7 => MacRuby 0.8 Comment: Should be fixed in r4954. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Nov 27 22:59:36 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 28 Nov 2010 06:59:36 -0000 Subject: [MacRuby] #1014: Unhelpful error message when loading the restclient gem Message-ID: <053.e899f601c255d47f65fcc7b44b5d9b3f@macosforge.org> #1014: Unhelpful error message when loading the restclient gem ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Tried with MacRuby 0.8 nightly build (Nov. 27) and restclient 1.6.1. When I try to load the gem I get the following error: ArgumentError: invalid string transliteration There is a thread on the macruby-devel mailing list about this problem "restclient gem with MacRuby". -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Nov 28 15:43:32 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 28 Nov 2010 23:43:32 -0000 Subject: [MacRuby] #135: macgem won't install hpricot In-Reply-To: <051.ae6c1909a05a07d293f4d10db9cd7cfe@macosforge.org> References: <051.ae6c1909a05a07d293f4d10db9cd7cfe@macosforge.org> Message-ID: <060.4f5c760ca39f3d046afb45b33c5c5491@macosforge.org> #135: macgem won't install hpricot ----------------------------------+----------------------------------------- Reporter: masterkain@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: macgem hpricot | ----------------------------------+----------------------------------------- Changes (by watson1978@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: could install a hpricot with MacRuby Latest. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 29 15:54:07 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 29 Nov 2010 23:54:07 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.d229597e5430ecdbd45e2be61b7332ff@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------------------+-------------------------------- Comment(by watson1978@?): It seems to have to use uregex_findNext() to support \G. {{{ #!diff diff --git a/re.c b/re.c index afbed36..49cbdb8 100644 --- a/re.c +++ b/re.c @@ -785,10 +785,13 @@ rb_reg_matcher_search(VALUE re, VALUE matcher, int pos, bool reverse) return -1; } } - else if (!uregex_find(re_matcher->pattern, pos, &status)) { - // No match. - rb_backref_set(Qnil); - return -1; + else { + uregex_setRegion(re_matcher->pattern, pos, chars_len, &status); + if (!uregex_findNext(re_matcher->pattern, &status)) { + // No match. + rb_backref_set(Qnil); + return -1; + } } // Match found. }}} Test Script: {{{ require 'tempfile' require 'test/unit/assertions.rb' include Test::Unit::Assertions str = "0123456789" assert_equal(["01", "23", "45", "67", "89"], str.scan(/\G\d\d/)) assert_equal("x23456789", str.sub(/\G\d\d/, "x")) assert_equal("xxxxx", str.gsub(/\G\d\d/, "x")) assert_equal(2, str.index(/\G\d\d/, 2)) # not yet #assert_equal(2, str.rindex(/\G\d\d/, 2)) puts :ok }}} I think that many methods can support \G by an above change. but does not supported yet with String#rindex and String#rpartition. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 29 18:04:52 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 02:04:52 -0000 Subject: [MacRuby] #1002: AXUIElement functions won't accept Pointers of type :id In-Reply-To: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> References: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> Message-ID: <053.99c0d3ac5c6686ef6e0e86a2d463c6d3@macosforge.org> #1002: AXUIElement functions won't accept Pointers of type :id ---------------------------+------------------------------------------------ Reporter: haxie1@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: ---------------------------+------------------------------------------------ Comment(by lsansonetti@?): MacRuby will not let you create a void pointer, but it will let you pass any pointer as a void* argument. But here, the function accepts a void** pointer, so it's a different story. What you need to do is create a Pointer to void*, pass it to the API, then cast it back as a pointer to type id. {{{ $ cat t.rb framework 'ApplicationServices' pid = 433 safari = AXUIElementCreateApplication(pid) titlePtr = Pointer.new('^v') err = AXUIElementCopyAttributeValue(safari, "AXTitle", titlePtr) titlePtr.cast!('@') p titlePtr[0] $ ./miniruby t.rb "Safari" }}} I am pondering if MacRuby shouldn't let you pass the :id pointer directly. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 29 18:12:39 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 02:12:39 -0000 Subject: [MacRuby] #1002: AXUIElement functions won't accept Pointers of type :id In-Reply-To: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> References: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> Message-ID: <053.a9701de4846ecb8b4e16af2bec994484@macosforge.org> #1002: AXUIElement functions won't accept Pointers of type :id ---------------------------+------------------------------------------------ Reporter: haxie1@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------+------------------------------------------------ Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed Comment: Okay, I changed MacRuby accordingly in r4955. The following can be used now: {{{ $ cat t.rb framework 'ApplicationServices' pid = 433 safari = AXUIElementCreateApplication(pid) titlePtr = Pointer.new(:id) err = AXUIElementCopyAttributeValue(safari, "AXTitle", titlePtr) p titlePtr[0] $ ./miniruby t.rb "Safari" }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 29 18:48:37 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 02:48:37 -0000 Subject: [MacRuby] #1003: Copied Proc objects cause crash when used as Objective-C blocks In-Reply-To: <051.cb982a4897121f27d101149962f311d2@macosforge.org> References: <051.cb982a4897121f27d101149962f311d2@macosforge.org> Message-ID: <060.5c972abbc856f398e803d44f579feba6@macosforge.org> #1003: Copied Proc objects cause crash when used as Objective-C blocks ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): The problem here is that the Proc is prematurely garbage-collected. It must be retained during the live cycle of the block. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 29 19:40:09 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 03:40:09 -0000 Subject: [MacRuby] #849: MacRuby throws the exception of "Encoding::CompatibilityError" with various cases. In-Reply-To: <051.98d76f83714e71879164aaaa438b6d5c@macosforge.org> References: <051.98d76f83714e71879164aaaa438b6d5c@macosforge.org> Message-ID: <060.bae8bcb2e99d06ff833ec2b61ed3eced@macosforge.org> #849: MacRuby throws the exception of "Encoding::CompatibilityError" with various cases. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): It may not be a good idea to stop checking encodings, as it might simply hide genuine user-level bugs. Maybe we should fix #742, #849 etc. instead. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 29 19:42:09 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 03:42:09 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.f5b482bddd73b80246022577c6630572@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------------------+-------------------------------- Comment(by lsansonetti@?): Good job :) Maybe it doesn't work for #rindex since it applies the regex backward? (ICU does not support that, so we currently mimic it, as you can see in re.c). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 29 20:27:07 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 04:27:07 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.1b1b73fa96a8e1d9eb06378cac6df04d@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------------------+-------------------------------- Comment(by watson1978@?): > Maybe it doesn't work for #rindex since it applies the regex backward? (ICU does not support that, so we currently mimic it, as you can see in re.c). I see. It seems to be necessary for me to learn more ICU X( [[BR]] I modified the patch because I create the another bug.[[BR]] String#gsub, #scan and #split, those behavior has changed. Fortunately, for those methods, should use only uregex_findNext, not use uregex_setRegion. {{{ #!diff diff --git a/re.c b/re.c index afbed36..22514a2 100644 --- a/re.c +++ b/re.c @@ -747,8 +747,8 @@ rb_reg_matcher_destroy(VALUE matcher) xfree((void *)matcher); } -int -rb_reg_matcher_search(VALUE re, VALUE matcher, int pos, bool reverse) +static int +rb_reg_matcher_search_find(VALUE re, VALUE matcher, int pos, bool reverse, bool findFirst) { rb_regexp_matcher_t *re_matcher = (rb_regexp_matcher_t *)matcher; @@ -763,7 +763,7 @@ rb_reg_matcher_search(VALUE re, VALUE matcher, int pos, bool reverse) if (chars_len < 0) { chars_len = 0; } - + if (pos > chars_len || pos < 0) { rb_backref_set(Qnil); return -1; @@ -785,10 +785,15 @@ rb_reg_matcher_search(VALUE re, VALUE matcher, int pos, bool reverse) return -1; } } - else if (!uregex_find(re_matcher->pattern, pos, &status)) { - // No match. - rb_backref_set(Qnil); - return -1; + else { + if (findFirst) { + uregex_setRegion(re_matcher->pattern, pos, chars_len, &status); + } + if (!uregex_findNext(re_matcher->pattern, &status)) { + // No match. + rb_backref_set(Qnil); + return -1; + } } // Match found. @@ -839,6 +844,18 @@ rb_reg_matcher_search(VALUE re, VALUE matcher, int pos, bool reverse) return res[0].beg; } +int +rb_reg_matcher_search_first(VALUE re, VALUE matcher, int pos, bool reverse) +{ + return rb_reg_matcher_search_find(re, matcher, pos, reverse, true); +} + +int +rb_reg_matcher_search_next(VALUE re, VALUE matcher, int pos, bool reverse) +{ + return rb_reg_matcher_search_find(re, matcher, pos, reverse, false); +} + static long reg_match_pos(VALUE re, VALUE *strp, long pos) { diff --git a/re.h b/re.h index 595ee85..2006118 100644 --- a/re.h +++ b/re.h @@ -25,13 +25,15 @@ VALUE rb_regexp_source(VALUE re); VALUE rb_reg_matcher_new(VALUE re, VALUE str); void rb_reg_matcher_destroy(VALUE matcher); -int rb_reg_matcher_search(VALUE re, VALUE matcher, int pos, bool reverse); +int rb_reg_matcher_search_first(VALUE re, VALUE matcher, int pos, bool reverse); +int rb_reg_matcher_search_next(VALUE re, VALUE matcher, int pos, bool reverse); +#define rb_reg_matcher_search rb_reg_matcher_search_next static inline int rb_reg_search(VALUE re, VALUE str, int pos, bool reverse) { VALUE matcher = rb_reg_matcher_new(re, str); - const int res = rb_reg_matcher_search(re, matcher, pos, reverse); + const int res = rb_reg_matcher_search_first(re, matcher, pos, reverse); rb_reg_matcher_destroy(matcher); return res; } }}} Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions str = "hello homely world. hah!" assert_equal("huh? homely world. hah!", str.gsub(/\Ah\S+\s*/, "huh? ")) assert_equal(["hello "], str.scan(/\Ah\S+\s*/)) assert_equal(["", "homely world. hah!"], str.split(/\Ah\S+\s*/)) assert_equal(" Text\n", "Text\n".gsub(/^/, ' ')) assert_equal(" Text\n Foo", "Text\nFoo".gsub(/^/, ' ')) str = "0123456789" assert_equal(["01", "23", "45", "67", "89"], str.scan(/\G\d\d/)) assert_equal("x23456789", str.sub(/\G\d\d/, "x")) assert_equal("xxxxx", str.gsub(/\G\d\d/, "x")) assert_equal(2, str.index(/\G\d\d/, 2)) # not yet #assert_equal(2, str.rindex(/\G\d\d/, 2)) puts :ok }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 29 20:36:22 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 04:36:22 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.ef94627c743c550aa6020bf37574b8d2@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: minor | Milestone: Component: MacRuby | Resolution: fixed Keywords: | -------------------------------------------+-------------------------------- Changes (by watson1978@?): * status: new => closed * resolution: => fixed Comment: Fixed with r4956. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 29 20:36:43 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 04:36:43 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.9d742c70d0e4426b4bcc3b3e6feb07be@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | -------------------------------------------+-------------------------------- Changes (by watson1978@?): * milestone: => MacRuby 0.8 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Nov 29 21:53:42 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 05:53:42 -0000 Subject: [MacRuby] #1015: mark Cocoa as multithreaded by default Message-ID: <054.1f9a5559c352cd28aef0365acf9f4491@macosforge.org> #1015: mark Cocoa as multithreaded by default -------------------------------------+-------------------------------------- Reporter: mattaimonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- {{{ >> framework 'Foundation' => true >> Thread.new{} => # >> NSThread.multiThreaded? => false >> cocoa_lock = NSThread.alloc.init => # >> NSThread.multiThreaded? => false >> cocoa_lock.start => # >> NSThread.multiThreaded? => true }}} Using MacRuby threads doesn't mark cocoa as multithreaded which could potentially cause issues as per the documentation: Protecting the Cocoa Frameworks For multithreaded applications, Cocoa frameworks use locks and other forms of internal synchronization to ensure they behave correctly. To prevent these locks from degrading performance in the single-threaded case, however, Cocoa does not create them until the application spawns its first new thread using the NSThread class. If you spawn threads using only POSIX thread routines, Cocoa does not receive the notifications it needs to know that your application is now multithreaded. When that happens, operations involving the Cocoa frameworks may destabilize or crash your application. To let Cocoa know that you intend to use multiple threads, all you have to do is spawn a single thread using the NSThread class and let that thread immediately exit. Your thread entry point need not do anything. Just the act of spawning a thread using NSThread is enough to ensure that the locks needed by the Cocoa frameworks are put in place. If you are not sure if Cocoa thinks your application is multithreaded or not, you can use the isMultiThreaded method of NSThread to check. http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Multithreading/CreatingThreads/CreatingThreads.html -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 00:41:36 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 08:41:36 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.dfd8e6cbb9a160e5b59d569efa17d294@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | -------------------------------------------+-------------------------------- Changes (by lsansonetti@?): * status: closed => reopened * resolution: fixed => * milestone: MacRuby 0.8 => Comment: Thanks for the patch :) I confirm \G works better now, and the spec suite still passes for me, so no regression in sight. However, it looks like the problem reported above is still valid: {{{ $ /usr/local/bin/macruby t.rb /Users/lrz/src/macruby-trunk/t.rb:2:in `
': can't convert nil into String (TypeError) }}} I'm reopening the ticket. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 10:47:51 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 18:47:51 -0000 Subject: [MacRuby] #1002: AXUIElement functions won't accept Pointers of type :id In-Reply-To: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> References: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> Message-ID: <053.fa87eccad3882d541efc2d5aecc9da46@macosforge.org> #1002: AXUIElement functions won't accept Pointers of type :id ---------------------------+------------------------------------------------ Reporter: haxie1@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: Keywords: | ---------------------------+------------------------------------------------ Changes (by mrada@?): * status: closed => reopened * resolution: fixed => Comment: Laurent, I tried your test with the latest nightly build (I downloaded it a couple of minutes ago), but I am still getting an error and not the value of the string. ? cat test.rb framework 'Cocoa' pid = 426 # => current PID of Mail.app for me mail = AXUIElementCreateApplication(pid) ptr = Pointer.new :id ret = AXUIElementCopyAttributeValue(mail, 'AXTitle', ptr) puts ptr[0] Then I get this: ? macruby test.rb /Users/ferrous/test.rb:6:in `
': expected instance of Pointer of type `^v', got `@' (TypeError) [1] 42769 exit 1 macruby test.rb -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 12:14:16 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 20:14:16 -0000 Subject: [MacRuby] #1002: AXUIElement functions won't accept Pointers of type :id In-Reply-To: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> References: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> Message-ID: <053.3fff090d6b526b715cc2988721ea0b45@macosforge.org> #1002: AXUIElement functions won't accept Pointers of type :id ---------------------------+------------------------------------------------ Reporter: haxie1@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: Keywords: | ---------------------------+------------------------------------------------ Comment(by martinlagardette@?): Can you check your macruby's revision? I think the latest build was built before the patch was commited, but I don't know at what hour they are built. {{{ $> macruby -e 'p MACRUBY_REVISION' "svn revision 4928 from http://svn.macosforge.org/repository/ruby/MacRuby/trunk" }}} If your revision is less than 4955, then you have your answer :P -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 12:49:46 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 20:49:46 -0000 Subject: [MacRuby] #1002: AXUIElement functions won't accept Pointers of type :id In-Reply-To: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> References: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> Message-ID: <053.518c12f89c527485695edb550e0fc25e@macosforge.org> #1002: AXUIElement functions won't accept Pointers of type :id ---------------------------+------------------------------------------------ Reporter: haxie1@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: Keywords: | ---------------------------+------------------------------------------------ Comment(by mrada@?): Seems you are correct, sorry. I at revision 4954, off by one revision. I'll try again tomorrow. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 13:03:44 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 30 Nov 2010 21:03:44 -0000 Subject: [MacRuby] #1002: AXUIElement functions won't accept Pointers of type :id In-Reply-To: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> References: <044.fd1f70924bba887543cbe2919121c231@macosforge.org> Message-ID: <053.b7baedcbbc0c0c0caa5aa5b517cd9a93@macosforge.org> #1002: AXUIElement functions won't accept Pointers of type :id ---------------------------+------------------------------------------------ Reporter: haxie1@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------+------------------------------------------------ Changes (by lsansonetti@?): * status: reopened => closed * resolution: => fixed Comment: Good to know. Re-closing the bug, let us know if it still doesn't work with the next build :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 16:12:36 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Dec 2010 00:12:36 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.14efdfb347e6f0aec6d8d924f9923a99@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | -------------------------------------------+-------------------------------- Comment(by watson1978@?): hmm. With Trunk HEAD, when I executed an above test code, MacRuby displayed no message in my environment. {{{ #$ cat tg.rb require 'net/imap' Thread.start { imap = Net::IMAP.new('imap.gmail.com', 25, false) } sleep 30 puts :Timeout }}} {{{ $ macruby tg.rb Timeout $ ruby19 tg.rb Timeout }}} So I can't examine it what is the cause of this issue X( -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 16:24:03 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Dec 2010 00:24:03 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.f9d9879ff55923c69ae87aa916c0b395@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | -------------------------------------------+-------------------------------- Comment(by lsansonetti@?): I believe you don't see any message as the exception is being eaten by the thread exception handler. If you remove the Thread.start {} block and run the Net::IMAP.new call in the main thread, you should see the exception. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 16:47:38 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Dec 2010 00:47:38 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.3731e72e9b0ce917e16906c4cb64e900@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | -------------------------------------------+-------------------------------- Comment(by watson1978@?): I execute an original test code of this issue and waited for several minutes, but displayed no message and did not finish.[[BR]] CRuby too. So I added a Timeout. MacRuby display an error message when I changed an argument as follows.[[BR]] {{{ #cat tg.rb require 'net/imap' imap = Net::IMAP.new('imap.gmail.com', 993, true) }}} {{{ $ macruby tg.rb /Users/watson/tmp/tg.rb:2:in `
': undefined method `upcase' for nil:NilClass (NoMethodError) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 18:32:39 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Dec 2010 02:32:39 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.63680aa38bfa116c3925ad7552a6a6f2@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | -------------------------------------------+-------------------------------- Comment(by lsansonetti@?): As of trunk: {{{ $ DYLD_LIBRARY_PATH=. ./macruby -I./lib -r net/imap -e "Net::IMAP.new('imap.gmail.com', 993, true)" -e:1:in `
': undefined method `upcase' for nil:NilClass (NoMethodError) $ DYLD_LIBRARY_PATH=. ./macruby -I./lib -r net/imap -e "Net::IMAP.new('imap.gmail.com', 25, true)" -e:1:in `
': SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol (OpenSSL::SSL::SSLError) $ DYLD_LIBRARY_PATH=. ./macruby -I./lib -r net/imap -e "Net::IMAP.new('imap.gmail.com', 25, false)" -e:1:in `
': can't convert nil into String (TypeError) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 18:42:00 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Dec 2010 02:42:00 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.1b15571e28363e332fa09f71cd3d2ab9@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | -------------------------------------------+-------------------------------- Comment(by lsansonetti@?): I found out the problem in "lib/net/imap.rb" line 3113, here is a reduction: {{{ $ cat t2.rb str = "220 mx.google.com ESMTP v56sm7014509eeh.14\r\n" re = /\G(?:(?# 1: SPACE )( +)|(?# 2: NIL )(NIL)(?=[\x80-\xff(){ \x00-\x1f\x7f%*"\\\[\]+])|(?# 3: NUMBER )(\d+)(?=[\x80-\xff(){ \x00-\x1f\x7f%*"\\\[\]+])|(?# 4: ATOM )([^\x80-\xff(){ \x00-\x1f\x7f%*"\\\[\]+]+)|(?# 5: QUOTED )"((?:[^\x00\r\n"\\]|\\["\\])*)"|(?# 6: LPAR )(\()|(?# 7: RPAR )(\))|(?# 8: BSLASH )(\\)|(?# 9: STAR )(\*)|(?# 10: LBRA )(\[)|(?# 11: RBRA )(\])|(?# 12: LITERAL )\{(\d+)\}\r\n|(?# 13: PLUS )(\+)|(?# 14: PERCENT )(%)|(?# 15: CRLF )(\r\n)|(?# 16: EOF )(\z))/i pos = 0 str.index(re, pos) p $+ $ ruby t2.rb "220" $ ./miniruby t2.rb nil }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 20:46:59 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Dec 2010 04:46:59 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.200a843aea63e9af8169f412593ce0a9@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: minor | Milestone: Component: MacRuby | Resolution: Keywords: | -------------------------------------------+-------------------------------- Comment(by watson1978@?): I attach a patch: {{{ #!diff diff --git a/re.c b/re.c index 22514a2..3ff54c7 100644 --- a/re.c +++ b/re.c @@ -1829,7 +1829,18 @@ rb_reg_match_last(VALUE rcv) return Qnil; } assert(RMATCH(rcv)->results_count > 0); - return rb_reg_nth_match(RMATCH(rcv)->results_count - 1, rcv); + + int nth = RMATCH(rcv)->results_count - 1; + while(nth > 0) { + if (RMATCH(rcv)->results[nth].beg != -1) { + break; + } + nth--; + } + if (nth == 0) { + return Qnil; + } + return rb_reg_nth_match(nth, rcv); } /* }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Nov 30 22:39:29 2010 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 01 Dec 2010 06:39:29 -0000 Subject: [MacRuby] #1012: Inconsistent Regex behaviour In-Reply-To: <060.8b5171358fa817295eb45181fef04380@macosforge.org> References: <060.8b5171358fa817295eb45181fef04380@macosforge.org> Message-ID: <069.bce0c8e4d08eba82110a73f80bb93a19@macosforge.org> #1012: Inconsistent Regex behaviour -------------------------------------------+-------------------------------- Reporter: harry@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: minor | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | -------------------------------------------+-------------------------------- Changes (by lsansonetti@?): * status: reopened => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Wow, that was a quick fix :) I confirm that the commands pasted above now run without exception as of r4962 (your latest commit) and the spec suite still runs. So, let's close the bug. Thanks for contributing these fixes :) -- Ticket URL: MacRuby