From ruby-noreply at macosforge.org Sat Jan 1 08:08:17 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 01 Jan 2011 16:08:17 -0000 Subject: [MacRuby] #1085: Assertion failed: ((b->flags & flags) == flags) In-Reply-To: <051.c176022c98135fa95bba0d7b49e6c850@macosforge.org> References: <051.c176022c98135fa95bba0d7b49e6c850@macosforge.org> Message-ID: <060.89d72c07a610149076a6e9700d31e3fb@macosforge.org> #1085: Assertion failed: ((b->flags & flags) == flags) ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): Apparently, when a condition of the "top_b->flags == 0 && b->parent_block" is formed, VM_BLOCK_THREAD seems to be need. {{{ #!diff diff --git a/dispatcher.cpp b/dispatcher.cpp index 5d0d07c..3a2c71b 100644 --- a/dispatcher.cpp +++ b/dispatcher.cpp @@ -1233,7 +1233,8 @@ rb_vm_yield_args(void *_vm, int argc, const VALUE *argv) top_b = GetThreadPtr(vm->get_thread())->body; } } - if (top_b != NULL && (top_b->flags & VM_BLOCK_THREAD)) { + if (top_b != NULL && + ((top_b->flags & VM_BLOCK_THREAD) || (top_b->flags == 0 && b->parent_block))) { b->flags |= VM_BLOCK_THREAD; } }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 1 18:16:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 02 Jan 2011 02:16:53 -0000 Subject: [MacRuby] #1092: Unable to Update MacRuby Gems Message-ID: <053.335a7b8c68e0ac351289fac7c13f715d@macosforge.org> #1092: Unable to Update MacRuby Gems ------------------------------------+--------------------------------------- Reporter: dekiefer@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: macgem update failure ------------------------------------+--------------------------------------- macgem as well as macruby setup.rb fail with the following error: Darwin::dekiefer:10-> macruby setup.rb RubyGems 1.3.7 installed macruby(12841,0x7fff707cdca0) malloc: *** error for object 0x1052700e8: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug Abort macgem update --system also fails with the same error: Darwin::dekiefer:23-> macgem update --system Updating RubyGems Updating rubygems-update macruby(12969,0x7fff707cdca0) malloc: *** error for object 0x1049c0868: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug Abort Darwin::dekiefer:24-> macgem --version 1.3.7 Using the latest trunk: Darwin::dekiefer:3-> svn co http://svn.macosforge.org/repository/ruby/MacRuby/trunk MacRuby-trunk Checked out revision 5093. Darwin::dekiefer:4-> macruby --version MacRuby 0.9 (ruby 1.9.2) [universal-darwin10.0, x86_64] Darwin::dekiefer:22-> macgem environment RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.9.2 (2008-06-03 patchlevel 0) [universal-darwin10.0] - INSTALLATION DIRECTORY: /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2 - RUBY EXECUTABLE: /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/bin/macruby - EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS: - ruby - universal-darwin-10 - GEM PATHS: - /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2 - /Users/dekiefer/.gem/macruby/1.9.2 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/ -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 1 19:09:58 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 02 Jan 2011 03:09:58 -0000 Subject: [MacRuby] #1092: Unable to Update MacRuby Gems In-Reply-To: <053.335a7b8c68e0ac351289fac7c13f715d@macosforge.org> References: <053.335a7b8c68e0ac351289fac7c13f715d@macosforge.org> Message-ID: <062.73d075aa123dad709883ae3a264ebea4@macosforge.org> #1092: Unable to Update MacRuby Gems ------------------------------------+--------------------------------------- Reporter: dekiefer@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: macgem update failure ------------------------------------+--------------------------------------- Comment(by watson1978@?): Probably this problem will be the same as #1074. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 1 20:06:26 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 02 Jan 2011 04:06:26 -0000 Subject: [MacRuby] #1087: Assertion fails when Array#[]= was specified with very large index. In-Reply-To: <051.46af5d9c9679c95b43ef0ccf9b3820c3@macosforge.org> References: <051.46af5d9c9679c95b43ef0ccf9b3820c3@macosforge.org> Message-ID: <060.6a8622d4b2b7a9fd0c3f0a89971c4481@macosforge.org> #1087: Assertion fails when Array#[]= was specified with very large index. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by watson1978@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Fixed with r5094. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 2 02:18:13 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 02 Jan 2011 10:18:13 -0000 Subject: [MacRuby] #1083: Segfault occurs when calls the String#unpack('i') with block. In-Reply-To: <051.00f9c6bc7e1297a71e584cf264d9413c@macosforge.org> References: <051.00f9c6bc7e1297a71e584cf264d9413c@macosforge.org> Message-ID: <060.53052daf2b7ee5ad5bda1ccf66d313fd@macosforge.org> #1083: Segfault occurs when calls the String#unpack('i') with block. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by watson1978@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Fixed with r5100. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 2 07:15:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 02 Jan 2011 15:15:01 -0000 Subject: [MacRuby] #1093: nested class causes interface builder parsing to fail Message-ID: <042.ddc46abfa8e407e90d09fb73686d512b@macosforge.org> #1093: nested class causes interface builder parsing to fail -------------------------+-------------------------------------------------- Reporter: juri@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: ib -------------------------+-------------------------------------------------- Having a nested class inside a class used in IB causes the parsing to fail. I have a view controller class with three action methods, and they are visible in IB. When I added a nested class inside the class, the methods disappeared from view, causing warnings from IB. This changeset to my project solved the problem: https://bitbucket.org/juri/rcrunner/changeset/fa13577cdc48 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 2 14:45:23 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 02 Jan 2011 22:45:23 -0000 Subject: [MacRuby] #1094: Rspec2 gets lost in a backtrace when CRuby does not Message-ID: <053.955aa28526171e3ae46ee8d02cfeb0bb@macosforge.org> #1094: Rspec2 gets lost in a backtrace when CRuby does not ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Using Rspec 2.3 I reduced the problem to a simple test that is attached. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 2 14:46:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 02 Jan 2011 22:46:57 -0000 Subject: [MacRuby] #1094: Rspec2 gets lost in a backtrace when CRuby does not In-Reply-To: <053.955aa28526171e3ae46ee8d02cfeb0bb@macosforge.org> References: <053.955aa28526171e3ae46ee8d02cfeb0bb@macosforge.org> Message-ID: <062.e87120a7ae9f41d9ca7f6f978ff98573@macosforge.org> #1094: Rspec2 gets lost in a backtrace when CRuby does not ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@?): I should have mentioned that I am using the latest nightly build. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 2 14:53:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 02 Jan 2011 22:53:44 -0000 Subject: [MacRuby] #1095: Segfault on uninitialized constant in Rspec2 test Message-ID: <053.1562cf0356f0fc6cc539708265571481@macosforge.org> #1095: Segfault on uninitialized constant in Rspec2 test ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Using Rspec 2.3 and the nightly build of MacRuby from January 2, 2011. The test is malformed because it uses an uninitialized constant. I have attached the malformed test and the crash report. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 2 19:53:47 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 03:53:47 -0000 Subject: [MacRuby] #1019: String#gsub performance In-Reply-To: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> References: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> Message-ID: <060.6ecde7f4dbe03709e2ea5cdb13072f6a@macosforge.org> #1019: String#gsub performance ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): I think it's much slower because of the new String changes Vincent committed. We need to re-visit that and at least get the same numbers as before the changes. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 2 19:58:04 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 03:58:04 -0000 Subject: [MacRuby] #1092: Unable to Update MacRuby Gems In-Reply-To: <053.335a7b8c68e0ac351289fac7c13f715d@macosforge.org> References: <053.335a7b8c68e0ac351289fac7c13f715d@macosforge.org> Message-ID: <062.bf7df73f136e3471fdcd55c3f19c16a0@macosforge.org> #1092: Unable to Update MacRuby Gems ------------------------------------+--------------------------------------- Reporter: dekiefer@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: macgem update failure ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.9 => Comment: Indeed, likely the same as #1074. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 2 20:01:56 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 04:01:56 -0000 Subject: [MacRuby] #1093: nested class causes interface builder parsing to fail In-Reply-To: <042.ddc46abfa8e407e90d09fb73686d512b@macosforge.org> References: <042.ddc46abfa8e407e90d09fb73686d512b@macosforge.org> Message-ID: <051.ec5725565dc8150869fb37ef70b34ab9@macosforge.org> #1093: nested class causes interface builder parsing to fail -------------------------+-------------------------------------------------- Reporter: juri@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ib -------------------------+-------------------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.8 => MacRuby 1.0 Comment: Thanks for reporting this. While the IB parser might not be able for the time being to support nested classes, it should at least not stop processing a class that contains a nested class. Screening for 1.0 release. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 2 21:38:36 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 05:38:36 -0000 Subject: [MacRuby] #106: Syntax error with Variadic function In-Reply-To: <047.afc9e9192474fdd177a8c2522743d7bc@macosforge.org> References: <047.afc9e9192474fdd177a8c2522743d7bc@macosforge.org> Message-ID: <056.43511ade1f8f9f4cab59e0f7e092685c@macosforge.org> #106: Syntax error with Variadic function ------------------------------+--------------------------------------------- Reporter: byblue@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: #reduction ------------------------------+--------------------------------------------- Comment(by lsansonetti@?): Thanks a lot for the patch, I committed it as r5103. I will add specs later, so I leave the ticket open in the meantime. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 3 04:32:03 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 12:32:03 -0000 Subject: [MacRuby] #1096: Operator redefinition fails (Fixnum) Message-ID: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> #1096: Operator redefinition fails (Fixnum) --------------------------------------+------------------------------------- Reporter: Knut.Olaf.Lien@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: --------------------------------------+------------------------------------- This example is taken from ruby-lang.org page: {{{ Class Fixnum def +(other) self - other end end }}} Testing this does not yield correct result in MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] Tested correct in ruby 1.8.7 (2009-06-12 patchlevel 174) [universal- darwin10.0] and ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0] -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 3 10:51:40 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 18:51:40 -0000 Subject: [MacRuby] #1097: IRB doesn't work Message-ID: <043.9cf935f891ac98af74ba9a3c2fbe0ef0@macosforge.org> #1097: IRB doesn't work --------------------------+------------------------------------------------- Reporter: sema@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------+------------------------------------------------- I'm using MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] installed by RVM. IRB doesn't work: {{{ ~% macirb /Users/sema/.irbrc:3:in `
': no such file to load -- irb/ext/save- history (LoadError) from /usr/local/bin/macirb:36:in `block' from /usr/local/bin/macirb:9:in `block' from /usr/local/bin/macirb:7:in `
' }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 3 12:32:36 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 20:32:36 -0000 Subject: [MacRuby] #1097: IRB doesn't work In-Reply-To: <043.9cf935f891ac98af74ba9a3c2fbe0ef0@macosforge.org> References: <043.9cf935f891ac98af74ba9a3c2fbe0ef0@macosforge.org> Message-ID: <052.b42391644efd9e3362dfd8da4344b9bd@macosforge.org> #1097: IRB doesn't work --------------------------+------------------------------------------------- Reporter: sema@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------+------------------------------------------------- Comment(by sema@?): The problem was in my .irbrc file. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 3 14:16:25 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 22:16:25 -0000 Subject: [MacRuby] #1019: String#gsub performance In-Reply-To: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> References: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> Message-ID: <060.a7f57ceba79bec63a13e9f9e23830f6d@macosforge.org> #1019: String#gsub performance ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): I can't seem to reproduce that huge difference (0.1s -> 120/75s) here. {{{ $ time ruby -e 'txt=File.read("GPL"); 1000.times { txt.gsub!(/\w+/, "test") }' real 0m2.320s user 0m2.307s sys 0m0.007s $ time ./miniruby -e 'txt=File.read("GPL"); 1000.times { txt.gsub!(/\w+/, "test") }' real 0m6.319s user 0m6.780s sys 0m0.097s }}} Maybe the problem was fixed in r5081. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 3 14:18:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 22:18:48 -0000 Subject: [MacRuby] #1088: Performance: String#* is very slow. In-Reply-To: <051.40bec6a8abadfa4437e03ce7fa1144ad@macosforge.org> References: <051.40bec6a8abadfa4437e03ce7fa1144ad@macosforge.org> Message-ID: <060.cc59bf778ef08f84d35b4f2615662c79@macosforge.org> #1088: Performance: String#* is very slow. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Indeed, seems about the same speed now. Closing the ticket :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 3 14:23:50 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 22:23:50 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.29dcab57e45964527618ba7bd00e18e4@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): In my environment, trunk is a bit slower than before, but not as significantly. Before: {{{ $ time macruby t.rb real 0m1.433s user 0m1.694s sys 0m0.085s }}} trunk: {{{ $ time ./miniruby t.rb real 0m1.963s user 0m2.371s sys 0m0.093s }}} So, I suspect Vincent committed improvements in the meantime you last checked. Let's improve more. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 3 14:32:10 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 03 Jan 2011 22:32:10 -0000 Subject: [MacRuby] #1096: Operator redefinition fails (Fixnum) In-Reply-To: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> References: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> Message-ID: <064.15928681fae5fa00366a636dc99be32a@macosforge.org> #1096: Operator redefinition fails (Fixnum) --------------------------------------+------------------------------------- Reporter: Knut.Olaf.Lien@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: worksforme Keywords: | --------------------------------------+------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => worksforme * milestone: MacRuby 0.8 => Comment: It works for me. {{{ $ ./miniruby -e "class Fixnum; def +(o); self-o; end; end; p 4+2" 2 }}} Please provide test input. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 3 19:03:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 04 Jan 2011 03:03:44 -0000 Subject: [MacRuby] #1098: assert that all memory allocations actually succeeded Message-ID: <052.3ecc8b7fab2cd1d59b08428cd4aba99e@macosforge.org> #1098: assert that all memory allocations actually succeeded -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- There are lots of malloc/realloc calls in MacRuby core, but only a few of them actually check that the operation was a success. We need to add assertions everywhere to make sure a memory crasher will be more quickly identified. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 06:27:38 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 04 Jan 2011 14:27:38 -0000 Subject: [MacRuby] #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. In-Reply-To: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> References: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> Message-ID: <055.25edb664bea2ae735966e0e251261dd4@macosforge.org> #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by watson1978@?): I attach a patch. please check it :) {{{ #!diff diff --git a/sandbox.c b/sandbox.c index 9cfc172..3faff18 100644 --- a/sandbox.c +++ b/sandbox.c @@ -86,6 +86,9 @@ rb_sandbox_apply(VALUE self, SEL sel) rb_sandbox_t *box; Data_Get_Struct(self, rb_sandbox_t, box); char *error = NULL; + if (box->profile == NULL || box->flags == 0) { + rb_raise(rb_eRuntimeError, "needs a profile."); + } if (sandbox_init(box->profile, box->flags, &error) == -1) { rb_raise(rb_eSecurityError, "Couldn't apply sandbox: `%s`", error); } }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 07:22:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 04 Jan 2011 15:22:34 -0000 Subject: [MacRuby] #1019: String#gsub performance In-Reply-To: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> References: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> Message-ID: <060.420b259ae459a628f3e1102adbcc88db@macosforge.org> #1019: String#gsub performance ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): I tested this with 2011/01/04 nightly. This time, I changed the length of the text. I used the same original text and deleted later paragraphs to shorten it. {{{ MacRuby 0.9 2011/01/04 nightly - 1548 words Test 1 - 1.32 seconds Test 2 - 2.69 seconds MacRuby 0.9 2011/01/04 nightly - 2705 words Test 1 - 3.88 seconds Test 2 - 7.99 seconds MacRuby 0.9 2011/01/04 nightly - 3970 words Test 1 - 8.23 seconds Test 2 - 16.61 seconds MacRuby 0.9 2011/01/04 nightly - 6247 words Test 1 - 20.22 seconds Test 2 - 40.57 seconds MacRuby 0.9 2011/01/04 nightly - 8092 words Test 1 - 34.16 seconds Test 2 - 68.39 seconds }}} This build is faster than the one I tested last time (2010/12/24), but still much slower than before. Just to campare, I run the same test with 2010/12/17 nightly. {{{ MacRuby 0.9 2010/12/17 nightly - 8092 words Test 1 - 0.69 seconds Test 2 - 1.23 seconds }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 07:37:51 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 04 Jan 2011 15:37:51 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.d222463f357f06794d57fb71036fce62@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): I tested this with 2011/01/04 nightly and got the same result. And I found an error in the original post. The file I used had 8092 words. As in the original I run the script 10 times on each file. MacRuby 2011/01/04 nightly {{{ 1548 words - 1.50 1.48 1.53 8092 words - 34.87 34.89 34.84 }}} MacRuby 2010/12/17 nightly {{{ 1548 words - 0.087 0.093 0.092 8092 words - 0.57 0.56 0.54 }}} Do I have to wait one more day for the changes to be reflected on the nightly? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 10:42:22 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 04 Jan 2011 18:42:22 -0000 Subject: [MacRuby] #1099: macirb segfault Message-ID: <044.235cd8f12955f9f42bf08b94da8e0cb6@macosforge.org> #1099: macirb segfault ---------------------------+------------------------------------------------ Reporter: lucas@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: ---------------------------+------------------------------------------------ macirb segfaults when executing the following script: {{{ k, a, b, a1, b1 = 2, 4, 1, 12, 4 while TRUE # Next approximation p, q, k = k*k, 2*k+1, k+1 a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1 # Print common digits d = a / b d1 = a1 / b1 while d == d1 print d $stdout.flush a, a1 = 10*(a%b), 10*(a1%b1) d, d1 = a/b, a1/b1 end end }}} MacRuby 0.9 (ruby 1.9.2) [universal-darwin10.0, x86_64] Backtrace: {{{ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0xfffffffdfff49067 0x00007fff8312a700 in _class_getSuperclass () (gdb) backtrace #0 0x00007fff8312a700 in _class_getSuperclass () #1 0x000000010002a5cf in rb_objc_type () #2 0x0000000100068e99 in rb_fix_mul () #3 0x000000010014b3bb in rb_vm_dispatch () #4 0x0000000102d5bfa6 in ?? () #5 0x0000000102d9e0e2 in ?? () #6 0x0000000102d9d8e2 in ?? () #7 0x0000000100162aa3 in rb_vm_run () #8 0x0000000100162df1 in rb_vm_run_under () #9 0x0000000100102397 in rb_f_eval () #10 0x000000010014ad85 in rb_vm_dispatch () #11 0x0000000100ce280c in dyld_stub_strncpy () #12 0x0000000100ce3b1a in MREP_C4FCC80C17B94A8A840A6F05C9DA0933 () #13 0x000000010014b36b in rb_vm_dispatch () #14 0x0000000100ce280c in dyld_stub_strncpy () #15 0x0000000100ce42cb in MREP_C4FCC80C17B94A8A840A6F05C9DA0933 () #16 0x000000010014b3bb in rb_vm_dispatch () #17 0x0000000100ce280c in dyld_stub_strncpy () #18 0x0000000100ce4c50 in MREP_C4FCC80C17B94A8A840A6F05C9DA0933 () #19 0x000000010014b3bb in rb_vm_dispatch () #20 0x0000000103bbe58c in dyld_stub_strncpy () #21 0x0000000103bbfa82 in MREP_E35DF62E8300447DAFB57E2B34A3A72E () #22 0x000000010014b3bb in rb_vm_dispatch () #23 0x0000000103bbe58c in dyld_stub_strncpy () #24 0x0000000103bbfeac in MREP_E35DF62E8300447DAFB57E2B34A3A72E () #25 0x000000010014b3bb in rb_vm_dispatch () #26 0x0000000103bbe58c in dyld_stub_strncpy () #27 0x0000000103bc011a in MREP_E35DF62E8300447DAFB57E2B34A3A72E () #28 0x000000010014b396 in rb_vm_dispatch () #29 0x0000000102d5bfa6 in ?? () #30 0x0000000102d5ab86 in ?? () #31 0x0000000102d5a26b in ?? () #32 0x0000000102d5a173 in ?? () #33 0x0000000100162aa3 in rb_vm_run () #34 0x0000000100041790 in ruby_run_node () #35 0x0000000100000d28 in main () }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 16:31:18 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 00:31:18 -0000 Subject: [MacRuby] #1100: Performance: File#read with huge file is slow. Message-ID: <051.afbebc26534acc94c751f0c1a65696d3@macosforge.org> #1100: Performance: File#read with huge file is slow. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby require 'benchmark' Benchmark.bm(10) do |x| 5.times do |i| i = (i + 1) * 10 File.open("bm_#{i}m.txt", "w") {|f| f.write "x" * i * 1024 * 1024 } x.report("size = #{i}M") { 10.times do File.open("bm_#{i}m.txt") {|f| f.read } end } end end }}} Result with CRuby 1.8: {{{ $ ruby bm_fread.rb user system total real size = 10M 0.060000 0.130000 0.190000 ( 0.211715) size = 20M 0.140000 0.290000 0.430000 ( 0.459126) size = 30M 0.200000 0.410000 0.610000 ( 0.634365) size = 40M 0.260000 0.560000 0.820000 ( 0.828851) size = 50M 0.330000 0.690000 1.020000 ( 1.029419) }}} Result with MacRuby latest: {{{ $ macruby bm_fread.rb user system total real size = 10M 0.980000 0.450000 1.430000 ( 0.912856) size = 20M 2.020000 0.870000 2.890000 ( 2.176286) size = 30M 3.170000 1.820000 4.990000 ( 3.616632) size = 40M 3.870000 0.900000 4.770000 ( 2.808244) size = 50M 7.250000 2.960000 10.210000 ( 49.571520) }}} From the stage that used up memory of my machine, it becomes late rapidly. [[BR]] It became late at a stage of 5M with another machine. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 16:46:06 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 00:46:06 -0000 Subject: [MacRuby] #1100: Performance: File#read with huge file is slow. In-Reply-To: <051.afbebc26534acc94c751f0c1a65696d3@macosforge.org> References: <051.afbebc26534acc94c751f0c1a65696d3@macosforge.org> Message-ID: <060.7a55c97a8cec27960a4d85a5be6a54e3@macosforge.org> #1100: Performance: File#read with huge file is slow. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): Environment that I used for a benchmark: {{{ $ /usr/sbin/system_profiler SPHardwareDataType Hardware: Hardware Overview: Model Name: iMac Model Identifier: iMac7,1 Processor Name: Intel Core 2 Duo Processor Speed: 2 GHz Number Of Processors: 1 Total Number Of Cores: 2 L2 Cache: 4 MB Memory: 4 GB Bus Speed: 800 MHz Boot ROM Version: IM71.007A.B03 SMC Version (system): 1.20f4 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 21:21:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 05:21:01 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.9018ea1dcee703fdadbcb29f6ed8bf47@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Normally you should have the changes, so I guess my test is not the same as yours. Anyways, I committed an optimization as r5114, can you re-test with the next build? Also, can you attach the words files somewhere? (I use /usr/share/dict/words but apparently it doesn't give the same runtime numbers are yours). Thanks! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 21:22:20 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 05:22:20 -0000 Subject: [MacRuby] #1072: macgem is broken in trunk In-Reply-To: <054.4212b587fe700ec005a72b4115fc62bd@macosforge.org> References: <054.4212b587fe700ec005a72b4115fc62bd@macosforge.org> Message-ID: <063.0c3c95bad151d6e4fae903e692825480@macosforge.org> #1072: macgem is broken in trunk -------------------------------------+-------------------------------------- Reporter: hghoehne@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | -------------------------------------+-------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Sorry, I reproduced the problem after. It should be fixed in r5114. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 21:23:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 05:23:53 -0000 Subject: [MacRuby] #1074: Abort occurs when install the rubygems. In-Reply-To: <051.ec1d00b8739e0764d2037fb9ba428dd4@macosforge.org> References: <051.ec1d00b8739e0764d2037fb9ba428dd4@macosforge.org> Message-ID: <060.b0a3edfc3ca3afb911c681988bcff570@macosforge.org> #1074: Abort occurs when install the rubygems. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Should be fixed in r5114. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 21:24:05 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 05:24:05 -0000 Subject: [MacRuby] #1092: Unable to Update MacRuby Gems In-Reply-To: <053.335a7b8c68e0ac351289fac7c13f715d@macosforge.org> References: <053.335a7b8c68e0ac351289fac7c13f715d@macosforge.org> Message-ID: <062.6a28e5659fd9c911f62a963d290b1bf8@macosforge.org> #1092: Unable to Update MacRuby Gems ------------------------------------+--------------------------------------- Reporter: dekiefer@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: macgem update failure | ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Should be fixed in r5114. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 21:25:14 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 05:25:14 -0000 Subject: [MacRuby] #1078: segfault when trying to use macgem to install a gem In-Reply-To: <053.a1c3f1dfcd0709452ee8e706afb1aa98@macosforge.org> References: <053.a1c3f1dfcd0709452ee8e706afb1aa98@macosforge.org> Message-ID: <062.de36f0cb454ae4fed0b6351a7088a10a@macosforge.org> #1078: segfault when trying to use macgem to install a gem ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Should be fixed in r5114. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 21:30:23 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 05:30:23 -0000 Subject: [MacRuby] #1079: Failed to install pg gem In-Reply-To: <049.fb0d4e08b5088870d5e90ac5417406c7@macosforge.org> References: <049.fb0d4e08b5088870d5e90ac5417406c7@macosforge.org> Message-ID: <058.541ac5c1ea37d8af8be1f505a408845c@macosforge.org> #1079: Failed to install pg gem --------------------------------+------------------------------------------- Reporter: mr.saint@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.8 => Comment: More C API to implement: {{{ /usr/bin/gcc -I. -I/Library/Frameworks/MacRuby.framework/Versions/0.8/usr/include/ruby-1.9.2 /universal-darwin10.0 -I/Library/Frameworks/MacRuby.framework/Versions/0.8/usr/include/ruby-1.9.2/ruby/backward -I/Library/Frameworks/MacRuby.framework/Versions/0.8/usr/include/ruby-1.9.2 -I. -DRUBY_EXTCONF_H=\"extconf.h\" -I/opt/local/include/postgresql90 -fno-common -arch x86_64 -fexceptions -fno-common -pipe -O3 -g -Wall -pipe -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after- statement -Wendif-labels -fno-strict-aliasing -fwrapv -arch x86_64 -arch x86_64 -o pg.o -c pg.c 28 pg.c: In function 'pgconn_s_quote_connstr': 29 pg.c:88: warning: assignment discards qualifiers from pointer target type 30 pg.c: In function 'new_pgresult': 31 pg.c:141: warning: implicit declaration of function 'rb_enc_to_index' 32 pg.c: In function 'enc_get_index': 33 pg.c:3723: warning: implicit declaration of function 'ENCODING_GET_INLINED' 34 pg.c:3724: error: 'ENCODING_INLINE_MAX' undeclared (first use in this function) 35 pg.c:3724: error: (Each undeclared identifier is reported only once 36 pg.c:3724: error: for each function it appears in.) 37 pg.c: In function 'pgconn_internal_encoding_set': 38 pg.c:3850: warning: implicit declaration of function 'rb_usascii_str_new_cstr' }}} Strangely, if I recall correctly the pg gem used to be installable. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 21:50:46 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 05:50:46 -0000 Subject: [MacRuby] #1080: Add #size method for C struct classes In-Reply-To: <050.c11cd4fbaaaf22f83bc5c613118fe922@macosforge.org> References: <050.c11cd4fbaaaf22f83bc5c613118fe922@macosforge.org> Message-ID: <059.3ed4500a4c5c42fa336573cd14a22f95@macosforge.org> #1080: Add #size method for C struct classes ---------------------------------+------------------------------------------ Reporter: kyossi212@? | Owner: lsansonetti@? Type: enhancement | Status: closed Priority: major | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: C struct sizeof | ---------------------------------+------------------------------------------ Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Should be added in r5117. All struct classes now respond to #size. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 4 23:17:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 07:17:15 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.927d190b05091ae2fa3819fac62ec447@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): After investigating with Watson, we realized that this test will behave slower than 0.8 on UTF-8 files containing non-ASCII characters. Indeed, if the file contains unicode (multibyte) characters, MacRuby cannot identify string lengths and boundaries in a constant time fashion, which results in performance loss. 0.8 used to automatically convert these strings as UTF-16 internally for better performance, but in trunk, we removed the unicode datastore (for many other reasons, including multi-threading problems). We are discussing about adding an optimization in trunk, basically caching the boundaries. In the meantime, try forcing your file data object as UTF-16, using #encode, and see if you get the same performance numbers as 0.8. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 06:42:26 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 14:42:26 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.87ccdf0f69ed3d045d9184294e0da5e8@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): As suggested, I added .force_encoding("UTF-16BE") and run the test with 2011/01/05 nightly. {{{ freq = Hash.new(0) 10.times{File.read("test.txt").force_encoding("UTF- 16BE").scan(/\w+/){|word| freq[word] += 1}} }}} '''Results''' {{{ MacRuby 0.9 2011/01/05 1548 words - 0.082 0.092 0.081 8092 words - 0.43 0.44 0.47 }}} Now it is slightly faster than 0.8 (or 0.9 2010/12/17 nightly), though it's still twice as slow as 1.8.7. I also tested this with NSString#stringWithContentsOfFile:encoding:error: {{{ freq = Hash.new(0) 10.times{NSString.stringWithContentsOfFile("test.txt",encoding: NSUTF8StringEncoding, error: nil).scan(/\w+/){|word| freq[word] += 1}} }}} '''Results''' {{{ MacRuby 0.9 2011/01/05 1548 words - 1.39 1.38 1.42 8092 words - 34.81 34.47 34.54 }}} By applying force_encoding, this process also took less time. {{{ freq = Hash.new(0) 10.times{NSString.stringWithContentsOfFile("test.txt",encoding: NSUTF8StringEncoding, error: nil).UTF8String.force_encoding("UTF- 16BE").scan(/\w+/){|word| freq[word] += 1}} }}} '''Results''' {{{ MacRuby 0.9 2011/01/05 1548 words - 0.096 0.084 0.081 8092 words - 0.42 0.42 0.45 }}} This workaround works, but it would be desirable not to have to add extra methods. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 06:48:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 14:48:54 -0000 Subject: [MacRuby] #1078: segfault when trying to use macgem to install a gem In-Reply-To: <053.a1c3f1dfcd0709452ee8e706afb1aa98@macosforge.org> References: <053.a1c3f1dfcd0709452ee8e706afb1aa98@macosforge.org> Message-ID: <062.f72345de603e49a608017c39e7362d98@macosforge.org> #1078: segfault when trying to use macgem to install a gem ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Comment(by mrada@?): Yes, I can install gems now. Thanks! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 07:11:41 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 15:11:41 -0000 Subject: [MacRuby] #1019: String#gsub performance In-Reply-To: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> References: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> Message-ID: <060.fc55d4dd9fddbeb503696b0d61ee80d8@macosforge.org> #1019: String#gsub performance ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): With 2011/01/05, the test results are the same. {{{ MacRuby 0.9 2011/01/05 nightly - 8092 words Test 1 - 34.35 seconds Test 2 - 69.64 seconds }}} With force_encoding, this process took much less time than 0.8 and only slightly slower than 1.8.7. Test 1 - gsub {{{ 10.times{File.read("test.txt").force_encoding("UTF- 16BE").gsub!(/\w+/,"test".force_encoding("UTF-16BE"))} }}} Test 2 - gsub with block {{{ 10.times{File.read("test.txt").force_encoding("UTF-16BE").gsub!(/\w+/){|x| x.upcase}} }}} '''Results''' {{{ MacRuby 0.9 2011/01/05 nightly - 8092 words with force_encoding Test 1 - 0.16 seconds Test 2 - 0.40 seconds }}} The problem of this is that the script file should also be encoded in UTF- 16BE unless adding force_encode (or encode) to each string object created in the script. (or is there a better way?) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 07:13:24 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 15:13:24 -0000 Subject: [MacRuby] #1019: String#gsub performance In-Reply-To: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> References: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> Message-ID: <060.e27c665b5c894171e7be9a15d78d3a07@macosforge.org> #1019: String#gsub performance ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): Oh, 0.8 is MacRuby 0.8 and 1.8.7 is CRuby 1.8.7. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 07:28:37 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 15:28:37 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.c230a427073678361b53a67b21925da1@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): I forgot to add the results of another test. Here, I saved the same file as ASCII (lossy conversion) and then converted it to UTF-8 (this means the encoding is UTF-8 but only with ASCII characters). {{{ MacRuby 0.9 2011/01/05 - UTF-8 encoded but only with ASCII characters 8092 words - 0.58 0.63 0.56 }}} This is slightly slower than the one with force_encode, but much faster than the original test (a UTF-8 encoded file with multi-byte characters). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 07:34:19 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 15:34:19 -0000 Subject: [MacRuby] #1019: String#gsub performance In-Reply-To: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> References: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> Message-ID: <060.cf0ab87ee22647b08e367aaf80a50fe3@macosforge.org> #1019: String#gsub performance ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): I also run this test with the same file encoded in UTF-8 but only with ASCII characters (lossy conversion). {{{ MacRuby 0.9 2011/01/05 nightly - 8092 words, UTF-8 encoded but only with ASCII characters Test 1 - 0.21 seconds Test 2 - 0.57 seconds }}} This is slightly slower than force_encode, but much faster than the file in UTF-8 with multi-byte characters. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 12:55:29 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 20:55:29 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.1470adfa0047b1731a865aa67428c933@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): We will make sure accessing multibyte UTF-8 strings will be faster. Thank you for verifying this, at least we now know the bottleneck. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 12:56:37 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 20:56:37 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.f5db97b18f90dffc99a452fc9cadcb3a@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Also, I think that Ruby 1.9 may have the same problem as us. Ruby 1.8.7 doesn't have encoding support, but in 1.9, I believe UTF-8 will also be used by default here. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 12:58:46 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 20:58:46 -0000 Subject: [MacRuby] #1019: String#gsub performance In-Reply-To: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> References: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> Message-ID: <060.8e13d2e2c0f5091b98169adaaa0f0d98@macosforge.org> #1019: String#gsub performance ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Good to know this is also related to slow access of multibyte UTF8. Normally, the optimization we will implement for #1077 should also help here, killing 2 birds with one stone. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 13:48:51 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 21:48:51 -0000 Subject: [MacRuby] #1042: BigMath::log and BigMath:exp are broken In-Reply-To: <054.99c11d1d42d45236d2ee3b21ee4b994b@macosforge.org> References: <054.99c11d1d42d45236d2ee3b21ee4b994b@macosforge.org> Message-ID: <063.cce91939d7e727335077c090287edbee@macosforge.org> #1042: BigMath::log and BigMath:exp are broken -------------------------------------+-------------------------------------- Reporter: hghoehne@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by pthomson@?): Replying to [comment:4 lsansonetti@?]: > I believe the SIZEOF_BDIGITS change to 8 was done for performance reasons, a couple years ago. However, I do not remember the exact context of this change, anymore. The change was to use 64-bit integers for bignum basic storage and 128-bit integers (with uint128_t), which gained around a 10-15% speed boost (and halved space usage) for bignum calculations. However, it seems to have screwed something up in BigDecimal. I'm looking into the issue, but this code is old and very weird. If nobody can figure this out, the safest way to make this work is to revert the change that made BDIGIT a uint64_t and BDIGIT_DBL a __uint128_t. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 14:12:14 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 22:12:14 -0000 Subject: [MacRuby] #997: Calling a method removed with rb_undef_method gives an ArgumentError instead of a NoMethodError (was: FIxnum.new gives a strange error on MacRuby) In-Reply-To: <053.b59d73d0e14482295927c4a945023203@macosforge.org> References: <053.b59d73d0e14482295927c4a945023203@macosforge.org> Message-ID: <062.91b5537885b9c7973f7a2ca1ab70446d@macosforge.org> #997: Calling a method removed with rb_undef_method gives an ArgumentError instead of a NoMethodError ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: minor | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: #reduction ------------------------------------+--------------------------------------- Comment(by pthomson@?): This is showing up on all methods undefined with {{{ rb_undef_method }}} - try NilClass.new, FalseClass.new, TrueClass.new, and so on. In the VM source it looks like {{{ RoxorCore::undef_method }}} just uses class_replaceMethod to replace the old method with the {{{ rb_vm_undefined_imp }}} method. Laurent, since we can't remove methods (I think) with the ObjC runtime, could we replace the rb_vm_undefined_imp method with one that actually raises an undefined method exception instead of calling method_missing? Changing the title to reflect what's really going on. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 14:27:09 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 22:27:09 -0000 Subject: [MacRuby] #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. In-Reply-To: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> References: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> Message-ID: <055.7b7cef117ece68b2dee5b16aca56a062@macosforge.org> #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------+---------------------------------------------- Changes (by pthomson@?): * status: new => closed * resolution: => fixed Comment: Nice catch, watson. Fixed in r5122. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 14:32:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 22:32:48 -0000 Subject: [MacRuby] #1098: assert that all memory allocations actually succeeded In-Reply-To: <052.3ecc8b7fab2cd1d59b08428cd4aba99e@macosforge.org> References: <052.3ecc8b7fab2cd1d59b08428cd4aba99e@macosforge.org> Message-ID: <061.f0470835bb085633aee369ab0603c005@macosforge.org> #1098: assert that all memory allocations actually succeeded -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by pthomson@?): Doesn't the check for NULL in ruby_xmalloc_memory do this already? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 14:44:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 22:44:01 -0000 Subject: [MacRuby] #1097: IRB doesn't work In-Reply-To: <043.9cf935f891ac98af74ba9a3c2fbe0ef0@macosforge.org> References: <043.9cf935f891ac98af74ba9a3c2fbe0ef0@macosforge.org> Message-ID: <052.39b1cd476c6330ad95283e1f0aea9881@macosforge.org> #1097: IRB doesn't work --------------------------+------------------------------------------------- Reporter: sema@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: | --------------------------+------------------------------------------------- Changes (by pthomson@?): * status: new => closed * resolution: => invalid Comment: Replying to [comment:1 sema@?]: > The problem was in my .irbrc file. Glad it wasn't our fault. :-) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 14:47:26 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 22:47:26 -0000 Subject: [MacRuby] #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. In-Reply-To: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> References: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> Message-ID: <055.ca9d35776833ba1de4f6d50c5a5d6ee5@macosforge.org> #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: | -----------------------------+---------------------------------------------- Changes (by lsansonetti@?): * status: closed => reopened * resolution: fixed => Comment: I reverted your commit, as it's not the right way to fix this bug (as #initialize is defined with an arity of 1, an exception should be raised instead). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 14:56:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 05 Jan 2011 22:56:48 -0000 Subject: [MacRuby] #1101: Rake test tasks for minitest and rspec2 cause a segfault Message-ID: <053.e31e3c71c7398081bfbec73bc510e8e8@macosforge.org> #1101: Rake test tasks for minitest and rspec2 cause a segfault ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- These are the two cases I found so far. If I have a minitest rake task like this (generated by jeweler): require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' test.pattern = 'test/**/test_*.rb' test.verbose = true end And then `rake test` I see: ? rake test (in /Users/mrada/Developer/test) /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/bin/macruby -I"lib:lib:test" "/Users/mrada/.rvm/gems/macruby- nightly/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/test_test.rb" [1] 77800 segmentation fault rake test I will also attach a crash report. I am using MACRUBY_REVISION 5120 (nightly build from Jan 5). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 17:44:03 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 01:44:03 -0000 Subject: [MacRuby] #1042: BigMath::log and BigMath:exp are broken In-Reply-To: <054.99c11d1d42d45236d2ee3b21ee4b994b@macosforge.org> References: <054.99c11d1d42d45236d2ee3b21ee4b994b@macosforge.org> Message-ID: <063.2a47a9704f5bd2acf6c4b133b19b9563@macosforge.org> #1042: BigMath::log and BigMath:exp are broken -------------------------------------+-------------------------------------- Reporter: hghoehne@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by pthomson@?): Here's a patch that removes that dubious optimization: diff --git a/include/ruby/defines.h b/include/ruby/defines.h index c5b144b..dbbec8f 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -81,12 +81,7 @@ void xfree(void*); #include -#if defined(__LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060) -# define BDIGIT uint64_t -# define SIZEOF_BDIGITS 8 -# define BDIGIT_DBL __uint128_t -# define BDIGIT_DBL_SIGNED __int128_t -#elif SIZEOF_INT*2 <= SIZEOF_LONG_LONG +#if SIZEOF_INT*2 <= SIZEOF_LONG_LONG # define BDIGIT unsigned int # define SIZEOF_BDIGITS SIZEOF_INT # define BDIGIT_DBL unsigned LONG_LONG -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 17:45:11 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 01:45:11 -0000 Subject: [MacRuby] #1042: BigMath::log and BigMath:exp are broken In-Reply-To: <054.99c11d1d42d45236d2ee3b21ee4b994b@macosforge.org> References: <054.99c11d1d42d45236d2ee3b21ee4b994b@macosforge.org> Message-ID: <063.81cbe4ac82bbf94003f61d611a416b15@macosforge.org> #1042: BigMath::log and BigMath:exp are broken -------------------------------------+-------------------------------------- Reporter: hghoehne@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by pthomson@?): Whoops, forgot the code tags: {{{ diff --git a/include/ruby/defines.h b/include/ruby/defines.h index c5b144b..dbbec8f 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -81,12 +81,7 @@ void xfree(void*); #include -#if defined(__LP64__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060) -# define BDIGIT uint64_t -# define SIZEOF_BDIGITS 8 -# define BDIGIT_DBL __uint128_t -# define BDIGIT_DBL_SIGNED __int128_t -#elif SIZEOF_INT*2 <= SIZEOF_LONG_LONG +#if SIZEOF_INT*2 <= SIZEOF_LONG_LONG # define BDIGIT unsigned int # define SIZEOF_BDIGITS SIZEOF_INT # define BDIGIT_DBL unsigned LONG_LONG }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 5 23:50:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 07:50:15 -0000 Subject: [MacRuby] #1098: assert that all memory allocations actually succeeded In-Reply-To: <052.3ecc8b7fab2cd1d59b08428cd4aba99e@macosforge.org> References: <052.3ecc8b7fab2cd1d59b08428cd4aba99e@macosforge.org> Message-ID: <061.e7897431b1c71df355df5656edbdc357@macosforge.org> #1098: assert that all memory allocations actually succeeded -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by lsansonetti@?): I'm not concerned by auto zone allocations, but by regular ones. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 03:22:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 11:22:35 -0000 Subject: [MacRuby] #1096: Operator redefinition fails (Fixnum) In-Reply-To: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> References: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> Message-ID: <064.119dc3c39fe576c9fdf909d325e3d882@macosforge.org> #1096: Operator redefinition fails (Fixnum) --------------------------------------+------------------------------------- Reporter: Knut.Olaf.Lien@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | --------------------------------------+------------------------------------- Changes (by Knut.Olaf.Lien@?): * status: closed => reopened * resolution: worksforme => Comment: Does not work sing macirb though. Tried the same approach as you did and get the correct result. So this may be a bug in macirb? See transcript below. irb(main):001:0> class Fixnum irb(main):002:1> def +(o) irb(main):003:2> sel-o irb(main):004:1> end irb(main):005:0> end => nil irb(main):006:0> 4+2 => 6 irb(main):007:0> -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 03:29:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 11:29:01 -0000 Subject: [MacRuby] #1096: Operator redefinition fails (Fixnum) In-Reply-To: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> References: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> Message-ID: <064.40b60fe1a019f473b53c30ba46fdc951@macosforge.org> #1096: Operator redefinition fails (Fixnum) --------------------------------------+------------------------------------- Reporter: Knut.Olaf.Lien@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | --------------------------------------+------------------------------------- Comment(by Knut.Olaf.Lien@?): See proper formatted transcript below:: {{{ EPC-knut:~ knut.olaf$ macirb irb(main):001:0> class Fixnum irb(main):002:1> def +(o) irb(main):003:2> self-o irb(main):004:1> end irb(main):005:0> end => nil irb(main):006:0> 6+4 => 10 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 05:06:13 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 13:06:13 -0000 Subject: [MacRuby] #1096: Operator redefinition fails (Fixnum) In-Reply-To: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> References: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> Message-ID: <064.2a85dd76103b46803a11947c6df35596@macosforge.org> #1096: Operator redefinition fails (Fixnum) --------------------------------------+------------------------------------- Reporter: Knut.Olaf.Lien@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | --------------------------------------+------------------------------------- Comment(by watson1978@?): {{{ $ cat test.rb class Fixnum def +(o) self-o end end p 4+2 $ macruby test.rb 2 $ macirb irb(main):001:0> load "test.rb" 2 => true $ macirb irb(main):001:0> class Fixnum irb(main):002:1> def +(o) irb(main):003:2> self - o irb(main):004:1> end irb(main):005:0> end => nil irb(main):006:0> p 4 + 2 6 => 6 }}} I wrote your code within macirb, I reproduced. [[BR]] but, used only MacRuby and loaded test core within macirb, I did not. Probably it will be a problem of macirb. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 05:10:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 13:10:44 -0000 Subject: [MacRuby] #1096: Operator redefinition fails (Fixnum) In-Reply-To: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> References: <055.7388ebbf13e3fa01b271d7d963f6d348@macosforge.org> Message-ID: <064.c278acc9c40edaa9627a7834a48f419f@macosforge.org> #1096: Operator redefinition fails (Fixnum) --------------------------------------+------------------------------------- Reporter: Knut.Olaf.Lien@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | --------------------------------------+------------------------------------- Comment(by watson1978@?): sorry, type miss X( s/test core/test code/ -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 06:02:18 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 14:02:18 -0000 Subject: [MacRuby] #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. In-Reply-To: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> References: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> Message-ID: <055.5d8ce493690e08e53165288f5d885381@macosforge.org> #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: | -----------------------------+---------------------------------------------- Comment(by watson1978@?): Case of Segfault: {{{ $ DYLD_LIBRARY_PATH=. gdb --args ./macruby -e 'Sandbox.new.apply!' (gdb) b rb_sandbox_init Breakpoint 1 at 0x20c49ba554b042: file sandbox.c, line 34. (gdb) r Starting program: /Users/watson/src/macruby-trunk-svn/macruby -e Sandbox.new.apply\! Reading symbols for shared libraries .++++........................ done Reading symbols for shared libraries . done Reading symbols for shared libraries .. done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000068 0x00007fff88414339 in flockfile () (gdb) }}} Case of Success: {{{ $ DYLD_LIBRARY_PATH=. gdb --args ./macruby -e 'Sandbox.no_internet.apply!' (gdb) b rb_sandbox_init Breakpoint 1 at 0x20c49ba554b042: file sandbox.c, line 34. (gdb) r Starting program: /Users/watson/src/macruby-trunk-svn/macruby -e Sandbox.no_internet.apply\! Reading symbols for shared libraries .++++........................ done Reading symbols for shared libraries . done Reading symbols for shared libraries .. done Program exited normally. (gdb) }}} Will it be a meaning that it is a problem that #initialize is not called? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 10:05:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 18:05:57 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.8b1e6bad73502e223ba7ac22013aa546@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): I installed Ruby 1.9.2 via MacPorts on another machine and run the script. {{{ freq = Hash.new(0) 10.times{File.read("test.txt").scan(/\w+/){|word| freq[word] += 1}} }}} The file contains 8092 words encoded in UTF-8 with multi-byte characters (in sec.). This machine is slightly faster than the one I used for previous tests. {{{ MacRuby 0.9 2011/01/05 27.26 28.55 27.26 CRuby 1.8.7 0.21 0.21 0.21 CRuby 1.9.2 (MacPorts) 0.11 0.11 0.11 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 11:52:09 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 19:52:09 -0000 Subject: [MacRuby] #854: Time and NSDate cannot be compared with Comparable operators In-Reply-To: <051.8a8c3e73cd37edaefcca084b59a284d6@macosforge.org> References: <051.8a8c3e73cd37edaefcca084b59a284d6@macosforge.org> Message-ID: <060.f92cd6300bc6a64e1b6407a1e9993611@macosforge.org> #854: Time and NSDate cannot be compared with Comparable operators ----------------------------------+----------------------------------------- Reporter: massicotte@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by pthomson@?): Works for me as of r5123. Can anyone else confirm this? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 11:54:05 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 19:54:05 -0000 Subject: [MacRuby] #1098: assert that all memory allocations actually succeeded In-Reply-To: <052.3ecc8b7fab2cd1d59b08428cd4aba99e@macosforge.org> References: <052.3ecc8b7fab2cd1d59b08428cd4aba99e@macosforge.org> Message-ID: <061.921d3c0cc75b0fc597115dbb2ce71b59@macosforge.org> #1098: assert that all memory allocations actually succeeded -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by pthomson@?): We could do something clever like loading in a custom malloc() using LD_PRELOAD. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 13:45:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 21:45:15 -0000 Subject: [MacRuby] #1098: assert that all memory allocations actually succeeded In-Reply-To: <052.3ecc8b7fab2cd1d59b08428cd4aba99e@macosforge.org> References: <052.3ecc8b7fab2cd1d59b08428cd4aba99e@macosforge.org> Message-ID: <061.b1633e0bf4d277ceaf8b7773c6e70717@macosforge.org> #1098: assert that all memory allocations actually succeeded -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Comment(by lsansonetti@?): That's not clever but terribly bad, let's just fix the call sites :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 14:09:21 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 22:09:21 -0000 Subject: [MacRuby] #1102: segfault when trying const_get on unitialized constant with rspec2 Message-ID: <053.37de3bcf944850866110f1d562383682@macosforge.org> #1102: segfault when trying const_get on unitialized constant with rspec2 ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- When I try to run const_get inside of a begin/rescue/end statement it should be safe, but when I try to spec the code in rspec it causes MacRuby to segfault instead of rescuing. I was using rspec 2.4 with the latest nightly build (Jan 6). This may be related to ticket #1095, I have attached a reduced script. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 14:58:26 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 06 Jan 2011 22:58:26 -0000 Subject: [MacRuby] #1103: csv.rb oddity Message-ID: <050.37803080c8c340dd8bee99e00db62235@macosforge.org> #1103: csv.rb oddity ---------------------------------+------------------------------------------ Reporter: percent20@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: csv ---------------------------------+------------------------------------------ Copied from mailing list: I am not sure if I am just doing something wrong or what, but I am trying to read in a CSV file and it seems the code I use for ruby 1.9.2 works fine, but not in MacRuby. I think I am doing something wrong, but not quite sure what since I am still new to MacRuby and getting familiar with it. I have put the following code in 'irb' and it works just fine and spits out the first part of the array. CSV.open('save.csv', 'r') do |row| puts row[1] end With irb I get smith smith smith using 'macirb' I get this. NoMethodError: undefined method `[]' for # /Library/Frameworks/MacRuby.framework/Versions/0.8/usr/lib/ruby/1.9.2/csv.rb:1340:in `open' Same code two different irb's My csv file has this in it: John,Smith,john at smith.com,1234567 John,Smith,john at smith.com,1234567 John,Smith,john at smith.com,1234567 Can someone point out to me what I am doing wrong? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 16:02:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 00:02:32 -0000 Subject: [MacRuby] #1048: Performance of Hash with an Array as a key In-Reply-To: <051.0f79f32884e168bef5a43fae2e95614e@macosforge.org> References: <051.0f79f32884e168bef5a43fae2e95614e@macosforge.org> Message-ID: <060.4b67dd441e5e3f8464bbf82626c75b32@macosforge.org> #1048: Performance of Hash with an Array as a key ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Yasu, is forcing the data as utf16 fixing the problem here too? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 16:23:39 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 00:23:39 -0000 Subject: [MacRuby] #1081: API function for loading RBO files from Objective-C environment In-Reply-To: <059.a895d95a8006cfbeed3c8c1568644941@macosforge.org> References: <059.a895d95a8006cfbeed3c8c1568644941@macosforge.org> Message-ID: <068.9fda32fc282057a025f09c3347258b84@macosforge.org> #1081: API function for loading RBO files from Objective-C environment ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: enhancement | Status: closed Priority: minor | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: api rbo | ------------------------------------------+--------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby 0.8 => MacRuby 0.9 Comment: Should be fixed in r5124. evaluateFileAtPath: will now behave like #require, so it will work with .rbo and .bundle files too. However, the return value of evaluateFileAtPath: will not be the value of the last expression evaluated anymore. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 17:16:50 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 01:16:50 -0000 Subject: [MacRuby] #1102: segfault when trying const_get on unitialized constant with rspec2 In-Reply-To: <053.37de3bcf944850866110f1d562383682@macosforge.org> References: <053.37de3bcf944850866110f1d562383682@macosforge.org> Message-ID: <062.6bd8873f18484c6b0f55ddf6283cae96@macosforge.org> #1102: segfault when trying const_get on unitialized constant with rspec2 ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): I reproduce with trunk. Looks like an infinite recursion in #const_missing. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 17:41:03 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 01:41:03 -0000 Subject: [MacRuby] #1103: csv.rb oddity In-Reply-To: <050.37803080c8c340dd8bee99e00db62235@macosforge.org> References: <050.37803080c8c340dd8bee99e00db62235@macosforge.org> Message-ID: <059.18469d3849c301cd9ff8db7605dd31ad@macosforge.org> #1103: csv.rb oddity ---------------------------------+------------------------------------------ Reporter: percent20@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: csv ---------------------------------+------------------------------------------ Comment(by watson1978@?): {{{ $ cat test_csv.rb CSV.open('save.csv', 'r') do |row| puts row[1] end $ cat save.csv John,Smith,john at smith.com,1234567 John,Smith,john at smith.com,1234567 John,Smith,john at smith.com,1234567 $ ruby19 -v -r csv test_csv.rb ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0] test_csv.rb:2:in `block in
': undefined method `[]' for # (NoMethodError) from /usr/local/lib/ruby/1.9.1/csv.rb:1340:in `open' from test_csv.rb:1:in `
' $ irb19 irb(main):001:0> require 'csv' => true irb(main):002:0> CSV.open('save.csv', 'r') do |row| irb(main):003:1* puts row[1] irb(main):004:1> end NoMethodError: undefined method `[]' for # from (irb):3:in `block in irb_binding' from /usr/local/lib/ruby/1.9.1/csv.rb:1340:in `open' from (irb):2 from /usr/local/bin/irb19:12:in `
' irb(main):005:0> $ ruby -v -r csv test_csv.rb ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] Smith Smith Smith }}} In my environment, test code works fine in the CRuby1.8, but even does not work in CRuby1.9. Is there an error in my procedure? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 18:11:26 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 02:11:26 -0000 Subject: [MacRuby] #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. In-Reply-To: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> References: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> Message-ID: <055.d9ddbdf8d32b403afb066c69a887781a@macosforge.org> #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: | -----------------------------+---------------------------------------------- Comment(by lsansonetti@?): Watson: yes, there is a deeper bug in MacRuby. Normally, an ArgError exception should be raised, because #initialize is defined with arity 1. I think there is also a dup of this bug in another ticket (for another class). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 18:25:08 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 02:25:08 -0000 Subject: [MacRuby] #1103: csv.rb oddity In-Reply-To: <050.37803080c8c340dd8bee99e00db62235@macosforge.org> References: <050.37803080c8c340dd8bee99e00db62235@macosforge.org> Message-ID: <059.daf08ff9b7ac7a2413fad7f425ab2084@macosforge.org> #1103: csv.rb oddity ---------------------------------+------------------------------------------ Reporter: percent20@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: csv ---------------------------------+------------------------------------------ Comment(by nagachika00@?): Hi Please try CSV.readlines instead of CSV.open -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 18:30:24 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 02:30:24 -0000 Subject: [MacRuby] #1102: segfault when trying const_get on unitialized constant with rspec2 In-Reply-To: <053.37de3bcf944850866110f1d562383682@macosforge.org> References: <053.37de3bcf944850866110f1d562383682@macosforge.org> Message-ID: <062.0b2fd6784f22097c616b3211275f8969@macosforge.org> #1102: segfault when trying const_get on unitialized constant with rspec2 ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): Here is a reduction: {{{ $ cat t2.rb module M1 def const_missing(name) p :M1_const_missing super end end module M2 def const_missing(name) p :M2_const_missing super end end Object.extend(M1) Object.extend(M2) OMG }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 19:05:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 03:05:34 -0000 Subject: [MacRuby] #1103: csv.rb oddity In-Reply-To: <050.37803080c8c340dd8bee99e00db62235@macosforge.org> References: <050.37803080c8c340dd8bee99e00db62235@macosforge.org> Message-ID: <059.2ed64fc45407189c8160b6656fa6cf0a@macosforge.org> #1103: csv.rb oddity ---------------------------------+------------------------------------------ Reporter: percent20@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: csv ---------------------------------+------------------------------------------ Comment(by watson1978@?): Thank you, Nagachika-san! Indeed, it works when I use CSV.readlines. {{{ $ cat test_csv.rb CSV.readlines('save.csv').each do |row| puts row[1] end $ ruby -v -r csv test_csv.rb ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] Smith Smith Smith $ ruby19 -v -r csv test_csv.rb ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0] Smith Smith Smith $ macruby -v -r csv test_csv.rb MacRuby 0.9 (ruby 1.9.2) [universal-darwin10.0, x86_64] Smith Smith Smith }}} I watched a CSV library, but was about the same with CRuby1.9.2. (By encoding relations, there was a difference slightly.) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 19:19:45 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 03:19:45 -0000 Subject: [MacRuby] #1048: Performance of Hash with an Array as a key In-Reply-To: <051.0f79f32884e168bef5a43fae2e95614e@macosforge.org> References: <051.0f79f32884e168bef5a43fae2e95614e@macosforge.org> Message-ID: <060.4314de5a33527f0f313d574fcc3df054@macosforge.org> #1048: Performance of Hash with an Array as a key ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | ----------------------------------+----------------------------------------- Comment(by yasuimao@?): I used a different machine, so the numbers are different from the previous posts, but here's the results of the tests. I ran the test sequentially this time rather than running the test one by one, so the results might have been affected, yet it looks like force_encoding("UTF-16BE") does fix the problem. Still, MacRuby is much slower than CRuby, exp. 1.9.2. {{{ MacRuby 0.9 2011/01/06 n 1 2 3 1 F rep - Str 28.43 28.84 28.09 1 F rep - Ary 27.82 28.39 28.23 10 F - Str 27.10 26.08 25.55 10 F - Ary 28.68 32.55 37.19 18 F - Str 54.21 53.66 53.97 18 F - Ary 68.74 104.04 117.75 MacRuby 0.9 2011/01/06 - force_encoding n 1 2 3 1 F rep - Str 0.59 0.75 0.86 1 F rep - Ary 0.47 0.56 0.57 10 F - Str 0.72 0.78 0.87 10 F - Ary 1.02 1.38 1.41 18 F - Str 1.45 1.58 1.86 18 F - Ary 3.35 6.21 6.08 MacRuby 0.9 2010/12/17 n 1 2 3 1 F rep - Str 1.30 1.51 1.75 1 F rep - Ary 1.21 1.58 1.99 10 F - Str 1.55 1.62 1.81 10 F - Ary 5.18 9.73 13.91 18 F - Str 3.33 3.18 3.42 18 F - Ary 14.86 49.34 75.62 MacRuby 0.9 2010/12/17 - force_encoding n 1 2 3 1 F rep - Str 0.52 0.63 0.64 1 F rep - Ary 0.45 0.53 0.53 10 F - Str 0.66 0.68 0.74 10 F - Ary 1.04 1.43 1.45 18 F - Str 1.32 1.48 1.62 18 F - Ary 3.58 5.42 6.30 CRuby 1.8.7 n 1 2 3 1 F rep - Str 0.38 0.61 0.92 1 F rep - Ary 0.51 0.83 0.93 10 F - Str 0.56 0.72 0.90 10 F - Ary 0.51 0.70 0.82 18 F - Str 1.12 1.39 1.75 18 F - Ary 1.34 1.64 1.67 CRuby 1.9.2 n 1 2 3 1 F rep - Str 0.22 0.26 0.31 1 F rep - Ary 0.43 0.47 0.52 10 F - Str 0.28 0.30 0.30 10 F - Ary 0.42 0.42 0.44 18 F - Str 0.52 0.62 0.64 18 F - Ary 0.86 0.88 0.90 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 20:16:52 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 04:16:52 -0000 Subject: [MacRuby] #1104: Segfaulting when trying to run agent sieve benchmark (threading) Message-ID: <046.7a7720ba559e8fc85decfa5a2412bc54@macosforge.org> #1104: Segfaulting when trying to run agent sieve benchmark (threading) -----------------------------+---------------------------------------------- Reporter: ilya@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- File being run, error message: https://gist.github.com/769100 Gem @ https://github.com/igrigorik/agent -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 6 21:18:33 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 05:18:33 -0000 Subject: [MacRuby] #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. In-Reply-To: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> References: <046.b556fd83ed332bdb6461741d6a4a75f4@macosforge.org> Message-ID: <055.f8546b4acb9e8cb4a7513ba6a829e6f0@macosforge.org> #1025: Sandbox#apply! causes segfault when no argument is passed to constructor. -----------------------------+---------------------------------------------- Reporter: rob@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: | -----------------------------+---------------------------------------------- Comment(by watson1978@?): I see :) [[BR]] By the way, I think whether the following changes are necessary in rb_sandbox_init. {{{ #!diff diff --git a/sandbox.c b/sandbox.c index 9cfc172..145007a 100644 --- a/sandbox.c +++ b/sandbox.c @@ -33,7 +33,7 @@ rb_sandbox_init(VALUE obj, SEL sel, VALUE profile) Data_Get_Struct(obj, rb_sandbox_t, box); GC_WB(&box->profile, ruby_strdup(RSTRING_PTR(profile))); - box->flags = 0; + box->flags = SANDBOX_NAMED; return obj; } }}} Before changing it, raise a SecurityError: {{{ $ DYLD_LIBRARY_PATH=. ./macruby -e 'Sandbox.new("no-internet").apply!' -e:1:in `
': Couldn't apply sandbox: `line 1: unbound variable: no- internet ` (SecurityError) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 7 14:39:22 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 07 Jan 2011 22:39:22 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.e36bd1f157d6d9e47a0ce976f116273f@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Interesting, so CRuby 1.9.2 has an optimization for this too. It would be interesting to look at what they did. In the meantime, Vincent committed an optimization as r5130. In my environment, with a UTF-8 test file that contains multibyte characters, trunk now runs significantly (20x) faster than before. Please try the upcoming nightly build and let us know how it works for you :) Note that only #scan has been optimized so far. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 7 18:15:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 08 Jan 2011 02:15:57 -0000 Subject: [MacRuby] #1019: String#gsub performance In-Reply-To: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> References: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> Message-ID: <060.f986107c8b3ff6fb0c9cb55b399a2216@macosforge.org> #1019: String#gsub performance ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by vincent.isambart@?): String#gsub should now be much faster starting from r5136. Could you give it a try? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 8 01:10:12 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 08 Jan 2011 09:10:12 -0000 Subject: [MacRuby] #1105: upgrade to rubygems 1.4.2 Message-ID: <052.2ad06821921f5efa6865a5826d3917b0@macosforge.org> #1105: upgrade to rubygems 1.4.2 -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- Let's upgrade our copy of RubyGems to 1.4.2 before shipping 0.9. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 8 04:46:29 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 08 Jan 2011 12:46:29 -0000 Subject: [MacRuby] #1106: #initialize is not called in class which inherit Mutex. Message-ID: <051.f5daafdc0e373758ba04d5854f09684d@macosforge.org> #1106: #initialize is not called in class which inherit Mutex. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby class A < Mutex def initialize p "mutex" end end A.new }}} Result: {{{ $ ruby19 -v test_mutex.rb ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0] "mutex" $ macruby -v test_mutex.rb MacRuby 0.9 (ruby 1.9.2) [universal-darwin10.0, x86_64] }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 8 07:37:56 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 08 Jan 2011 15:37:56 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.8228fbf39aed4cc2275c2f30fdd291b9@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): I ran the original test (the one without force_encoding) on 2011/01/08 nightly. Now it is faster than 2010/12/17 nightly. {{{ MacRuby 0.9 nightly 2011/01/08 1548 words - 0.069 0.065 0.068 (File#read) 8092 words - 0.34 0.34 0.35 (File#read) 8092 words - 0.27 0.27 0.27 (File#read w/ force_encoding) 8092 words - 0.38 0.38 0.39 (NSString) 8092 words - 0.28 0.28 0.29 (NSString w/ force_encoding) }}} It is still slower than CRuby 1.8.7 or 1.9.2, but this is a great improvement. Thanks for the hard work! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 8 07:58:10 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 08 Jan 2011 15:58:10 -0000 Subject: [MacRuby] #1019: String#gsub performance In-Reply-To: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> References: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> Message-ID: <060.baceb5ca25c56ac807d8463e50c1b622@macosforge.org> #1019: String#gsub performance ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): I ran the test with 2011/01/08 nightly. I used a different machine, so the numbers are slightly different from the previous posts. The test file is with 8092 words, UTF-8 encoded with multi-byte characters. Results - Test 1 (sec.) {{{ MacRuby 0.9 2011/01/08 0.10 0.10 0.10 MacRuby 0.9 2011/01/08 0.097 0.097 0.096 (w/ force_encoding) CRuby 1.8.7 0.078 0.078 0.078 CRuby 1.9.1 0.062 0.061 0.061 }}} Results - Test 2 (sec.) {{{ MacRuby 0.9 2011/01/08 0.40 0.40 0.40 MacRuby 0.9 2011/01/08 0.27 0.27 0.27 (w/ force_encoding) CRuby 1.8.7 0.19 0.19 0.19 CRuby 1.9.2 0.099 0.099 0.099 }}} As with String#scan, it is much faster than before, but still slower than CRuby. Yet, this is a great improvement!! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 8 08:39:29 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 08 Jan 2011 16:39:29 -0000 Subject: [MacRuby] #1107: Need to implement rb_str_plus. Message-ID: <051.9124fd6ff7a43bfb003e917141f2d3fa@macosforge.org> #1107: Need to implement rb_str_plus. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby require 'iconv' str = "f\303\266\303\266 bar" p Iconv.iconv('ascii//ignore', 'utf-8', str) # => ["f bar"] }}} Result: {{{ $ macruby test_iconv.rb dyld: lazy symbol binding failed: Symbol not found: _rb_str_plus Referenced from: /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/site_ruby/1.9.2 /universal-darwin10.0/iconv.bundle Expected in: flat namespace dyld: Symbol not found: _rb_str_plus Referenced from: /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/site_ruby/1.9.2 /universal-darwin10.0/iconv.bundle Expected in: flat namespace zsh: trace trap macruby test_iconv.rb }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 8 09:08:46 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 08 Jan 2011 17:08:46 -0000 Subject: [MacRuby] #1105: upgrade to rubygems 1.4.2 In-Reply-To: <052.2ad06821921f5efa6865a5826d3917b0@macosforge.org> References: <052.2ad06821921f5efa6865a5826d3917b0@macosforge.org> Message-ID: <061.d94d04865bfe0441e4510ffe33432919@macosforge.org> #1105: upgrade to rubygems 1.4.2 -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------------+---------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Should be done in r5141. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 8 09:19:16 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 08 Jan 2011 17:19:16 -0000 Subject: [MacRuby] #1107: Need to implement rb_str_plus. In-Reply-To: <051.9124fd6ff7a43bfb003e917141f2d3fa@macosforge.org> References: <051.9124fd6ff7a43bfb003e917141f2d3fa@macosforge.org> Message-ID: <060.a3332731dc27630d4097d585ffa4b924@macosforge.org> #1107: Need to implement rb_str_plus. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Should be done in r5142. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 8 10:35:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 08 Jan 2011 18:35:57 -0000 Subject: [MacRuby] #1106: #initialize is not called in class which inherit Mutex. In-Reply-To: <051.f5daafdc0e373758ba04d5854f09684d@macosforge.org> References: <051.f5daafdc0e373758ba04d5854f09684d@macosforge.org> Message-ID: <060.7a0b0fb71fbd7d0ae8eb5976541279d1@macosforge.org> #1106: #initialize is not called in class which inherit Mutex. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): This seems to be because Mutex has a custom alloc function, but it isn't called when #new is performed on a superclass. Likely a bug in the class flags. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 8 10:53:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 08 Jan 2011 18:53:48 -0000 Subject: [MacRuby] #1106: #initialize is not called in class which inherit Mutex. In-Reply-To: <051.f5daafdc0e373758ba04d5854f09684d@macosforge.org> References: <051.f5daafdc0e373758ba04d5854f09684d@macosforge.org> Message-ID: <060.b23fb7272085685c24273a05be5224a7@macosforge.org> #1106: #initialize is not called in class which inherit Mutex. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Actually the bug was elsewhere, and should be fixed in r5143. I also fixed Thread and ThreadGroup. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 8 20:02:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 09 Jan 2011 04:02:57 -0000 Subject: [MacRuby] #766: macrake overrides /usr/bin/rake In-Reply-To: <052.8469ad740d83823faa98b546e34a2deb@macosforge.org> References: <052.8469ad740d83823faa98b546e34a2deb@macosforge.org> Message-ID: <061.8fd52e9e533ea10089717e2f561ac798@macosforge.org> #766: macrake overrides /usr/bin/rake -----------------------------------+---------------------------------------- Reporter: kennylovrin@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | -----------------------------------+---------------------------------------- Changes (by watson1978@?): * status: closed => reopened * resolution: fixed => * milestone: MacRuby 0.7 => Comment: With r5141, MacRuby's rubygems became v1.4.1 and came to reappear. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 9 20:37:38 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 10 Jan 2011 04:37:38 -0000 Subject: [MacRuby] #766: macrake overrides /usr/bin/rake In-Reply-To: <052.8469ad740d83823faa98b546e34a2deb@macosforge.org> References: <052.8469ad740d83823faa98b546e34a2deb@macosforge.org> Message-ID: <061.a87d54f971b3a8c68725fc4b07107b1a@macosforge.org> #766: macrake overrides /usr/bin/rake -----------------------------------+---------------------------------------- Reporter: kennylovrin@? | Owner: lsansonetti@? Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | -----------------------------------+---------------------------------------- Comment(by lsansonetti@?): Oops! Good catch, looks like I forgot to back port this change. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 10 06:11:03 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 10 Jan 2011 14:11:03 -0000 Subject: [MacRuby] #1108: Can't inherit the Module. Message-ID: <051.737b3fa4b1e0119c1b612ef433eea59e@macosforge.org> #1108: Can't inherit the Module. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby class T < Module attr_reader :value def initialize(x = 1234) @value = x end def read @value end end t = T.new(42) p t.read p t.value t = T.new p t.read p t.value }}} Result: {{{ $ ruby19 -v t.rb ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0] 42 42 1234 1234 $ macruby -v t.rb MacRuby 0.9 (ruby 1.9.2) [universal-darwin10.0, x86_64] /Users/watson/tmp/t.rb:12:in `
': wrong number of arguments (1 for 0) (ArgumentError) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 10 14:49:50 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 10 Jan 2011 22:49:50 -0000 Subject: [MacRuby] #1109: Installing a gem from disk fails Message-ID: <054.341002733b14554369a2ee483d422eb6@macosforge.org> #1109: Installing a gem from disk fails -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: rubygems -------------------------------------+-------------------------------------- For example: {{{ % sudo macgem install pkg/mac_bacon-1.1.21.gem ERROR: While executing gem ... (Zlib::BufError) buffer error }}} Installing from a remote source, however, does work: {{{ % sudo macgem install mac_bacon Successfully installed mac_bacon-1.1.21 1 gem installed }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 10 16:52:39 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 11 Jan 2011 00:52:39 -0000 Subject: [MacRuby] #766: macrake overrides /usr/bin/rake In-Reply-To: <052.8469ad740d83823faa98b546e34a2deb@macosforge.org> References: <052.8469ad740d83823faa98b546e34a2deb@macosforge.org> Message-ID: <061.e14a90add24a7f377b9c84cb59e0dbcc@macosforge.org> #766: macrake overrides /usr/bin/rake -----------------------------------+---------------------------------------- Reporter: kennylovrin@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------------+---------------------------------------- Changes (by lsansonetti@?): * status: reopened => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Thanks Patrick. I tweaked the patch to be smaller and committed it as r5155. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 10 17:33:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 11 Jan 2011 01:33:01 -0000 Subject: [MacRuby] #1109: Installing a gem from disk fails In-Reply-To: <054.341002733b14554369a2ee483d422eb6@macosforge.org> References: <054.341002733b14554369a2ee483d422eb6@macosforge.org> Message-ID: <063.c60667f17972f919fb6a8e4e09873de1@macosforge.org> #1109: Installing a gem from disk fails -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: rubygems -------------------------------------+-------------------------------------- Comment(by lsansonetti@?): {{{ (gdb) bt #0 rb_exc_raise (mesg=17189290048) at eval.c:322 #1 0x0000000104f7c9ec in raise_zlib_error (err=, msg=) at zlib.c:242 #2 0x0000000104f7cc2a in zstream_run (z=, src=, len=, flush=) at zlib.c:678 #3 0x0000000104f786bf in rb_zstream_finish (obj=17189172480, sel=0x0) at zlib.c:866 #4 0x000000010013bb36 in rb_vm_dispatch (_vm=0x100b22b60, cache=0x100ab5830, top=17189200288, self=17189172480, klass=0x40031a520, sel=0x7fff953ffdee, block=0x0, opt=0 '\0', argc=, argv=0x0) at dispatcher.cpp:159 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 10 17:42:03 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 11 Jan 2011 01:42:03 -0000 Subject: [MacRuby] #1109: Installing a gem from disk fails In-Reply-To: <054.341002733b14554369a2ee483d422eb6@macosforge.org> References: <054.341002733b14554369a2ee483d422eb6@macosforge.org> Message-ID: <063.78eee1dd0319217d3ec5be568097b7ce@macosforge.org> #1109: Installing a gem from disk fails -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: rubygems -------------------------------------+-------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.9 => Comment: "lib/rubygems/package/tar_input.rb" line 218 {{{ def zipped_stream(entry) if defined? Rubinius or defined? Maglev then # these implementations have working Zlib zis = Zlib::GzipReader.new entry dis = zis.read is = StringIO.new(dis) else # This is Jamis Buck's Zlib workaround for some unknown issue entry.read(10) # skip the gzip header zis = Zlib::Inflate.new(-Zlib::MAX_WBITS) is = StringIO.new(zis.inflate(entry.read)) end ensure zis.finish if zis # XXX we crash here end }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 10 17:54:04 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 11 Jan 2011 01:54:04 -0000 Subject: [MacRuby] #1109: Installing a gem from disk fails In-Reply-To: <054.341002733b14554369a2ee483d422eb6@macosforge.org> References: <054.341002733b14554369a2ee483d422eb6@macosforge.org> Message-ID: <063.d082bde9c500e7a218881db22584b732@macosforge.org> #1109: Installing a gem from disk fails -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: rubygems -------------------------------------+-------------------------------------- Comment(by lsansonetti@?): I verified that we were able to install the gem locally with macgem 1.3.6. However, in 1.4.1, we no longer can. I also verified that entering the first code path fixes the problem. I may commit this change then. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 10 17:56:25 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 11 Jan 2011 01:56:25 -0000 Subject: [MacRuby] #1109: Installing a gem from disk fails In-Reply-To: <054.341002733b14554369a2ee483d422eb6@macosforge.org> References: <054.341002733b14554369a2ee483d422eb6@macosforge.org> Message-ID: <063.4d7819f724f58c94cadf5c8169c056bb@macosforge.org> #1109: Installing a gem from disk fails -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: rubygems | -------------------------------------+-------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Done in r5156. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 11 12:30:51 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 11 Jan 2011 20:30:51 -0000 Subject: [MacRuby] #1110: macirb barfs on ->{} lambda syntax Message-ID: <050.0221f7606b2c062f8ef5ba5b3a9ff57a@macosforge.org> #1110: macirb barfs on ->{} lambda syntax ---------------------------------+------------------------------------------ Reporter: dev@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ {{{ $ macruby -e 'p ->{}' # $ macirb irb(main):001:0> ->{} SyntaxError: compile error (irb):1: syntax error, unexpected '{', expecting keyword_do_LAMBDA or tLAMBEG }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 12 08:28:08 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 12 Jan 2011 16:28:08 -0000 Subject: [MacRuby] #1111: MacRuby throws an exception when undefine the String#length. Message-ID: <051.15c3febcfa906475c287575627a0dd71@macosforge.org> #1111: MacRuby throws an exception when undefine the String#length. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test: {{{ $ ruby -v -e 'String.class_eval{ undef :length }' ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] $ ruby19 -v -e 'String.class_eval{ undef :length }' ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0] $ macruby -v -e 'String.class_eval{ undef :length }' MacRuby 0.9 (ruby 1.9.2) [universal-darwin10.0, x86_64] -e:1:in `
': cannot undefine method `length' because it is a native method (RuntimeError) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 12 13:49:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 12 Jan 2011 21:49:53 -0000 Subject: [MacRuby] #1112: Allowing pointers to be created and initialised directly with an integer Message-ID: <057.a07441087f9cb86e62b1f7f354af71ab@macosforge.org> #1112: Allowing pointers to be created and initialised directly with an integer ----------------------------------------+----------------------------------- Reporter: dave.baldwin@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- In OpenGL some functions take pointers and these are easily handled via v = Pointer.new('f', 20) glVertexPointer(3, GL_FLOAT, 3, v) (the C prototype is void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); however in some cases this function has been overloaded so you pass in an integer as the last parameter. In C this is easy glVertexPointer(3, GL_FLOAT, 3, (void *) 12) This is a horrible bit of API design in OpenGL but allows graphics data to be stored in the graphics memory (in vertex buffer objects) instead of in host memory so gives a significant performance boost for large data sets. The MacRuby Pointer objects don't have any way of setting the pointer to a given value - understandable as this is a dangerous thing to do normally - so the only way to use vertex buffer objects directly from MacRuby is to create a small objective c stub along the lines: - (void) glVBOVertexPointer: (GLint) size type: (GLenum) type stride: (GLsizei) stride offset:(GLint) offset { glVertexPointer(size, type, stride, (void *) offset); } and to call this. An alternative way of handling this (not tested) may be to add a method on to Integer along the lines to_void_ptr to return the a void * pointer initialised to the integer value? OpenGL uses this idiom in several places and it is probably not alone. Dave. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 12 14:22:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 12 Jan 2011 22:22:48 -0000 Subject: [MacRuby] #1112: Allowing pointers to be created and initialised directly with an integer In-Reply-To: <057.a07441087f9cb86e62b1f7f354af71ab@macosforge.org> References: <057.a07441087f9cb86e62b1f7f354af71ab@macosforge.org> Message-ID: <066.06b31438291f34942e8395977c692b0c@macosforge.org> #1112: Allowing pointers to be created and initialised directly with an integer ----------------------------------------+----------------------------------- Reporter: dave.baldwin@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Comment(by lsansonetti@?): I think a method such as Pointer.magic_value(fixnum) has to be introduced. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 12 14:24:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 12 Jan 2011 22:24:15 -0000 Subject: [MacRuby] #1110: macirb barfs on ->{} lambda syntax In-Reply-To: <050.0221f7606b2c062f8ef5ba5b3a9ff57a@macosforge.org> References: <050.0221f7606b2c062f8ef5ba5b3a9ff57a@macosforge.org> Message-ID: <059.7bca3af236fed0e1cb7a39ef76483f32@macosforge.org> #1110: macirb barfs on ->{} lambda syntax ---------------------------------+------------------------------------------ Reporter: dev@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Changes (by lsansonetti@?): * owner: lsansonetti@? => eloy.de.enige@? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 12 14:51:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 12 Jan 2011 22:51:54 -0000 Subject: [MacRuby] #1113: unexpected behaviour with enumerateObjectsUsingBlock Message-ID: <051.f3f1720f2a06ba10e47f9f9a9f4b8e71@macosforge.org> #1113: unexpected behaviour with enumerateObjectsUsingBlock ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- If a Proc is defined that uses 'enumerateObjectsUsingBlock' and that proc is then called on all items of an array by iterating through the array with 'enumerateObjectsUsingBlock', the parameters to both blocks are sent to the inner enumeration. Example below. {{{ framework 'Foundation' proc = Proc.new do |arg| [1,2,3].enumerateObjectsUsingBlock( Proc.new { |o, i, s| puts "inner enumeration #{o}" } ) puts arg.upcase end %w[a b c].enumerateObjectsUsingBlock( Proc.new do |obj, idx, stop| proc.call(obj) end ) }}} Output: {{{ inner enumeration 1 inner enumeration 2 inner enumeration 3 A inner enumeration b inner enumeration c }}} Expected output: {{{ inner enumeration 1 inner enumeration 2 inner enumeration 3 A inner enumeration 1 inner enumeration 2 inner enumeration 3 B inner enumeration 1 inner enumeration 2 inner enumeration 3 C }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 12 18:15:03 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 13 Jan 2011 02:15:03 -0000 Subject: [MacRuby] #1112: Allowing pointers to be created and initialised directly with an integer In-Reply-To: <057.a07441087f9cb86e62b1f7f354af71ab@macosforge.org> References: <057.a07441087f9cb86e62b1f7f354af71ab@macosforge.org> Message-ID: <066.c8369f1efa807335c35b4a7394bf070f@macosforge.org> #1112: Allowing pointers to be created and initialised directly with an integer ----------------------------------------+----------------------------------- Reporter: dave.baldwin@? | Owner: lsansonetti@? Type: enhancement | Status: closed Priority: minor | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------------+----------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: I added Pointer.magic_cookie in r5160. In your case, you can pass Pointer.magic_cookie(13) as the last argument of glVertexPointer(). Note that Pointer.magic_cookie will only accept Numeric values that can fit in a C long type (otherwise, an exception will be raised). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 12 18:26:02 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 13 Jan 2011 02:26:02 -0000 Subject: [MacRuby] #1048: Performance of Hash with an Array as a key In-Reply-To: <051.0f79f32884e168bef5a43fae2e95614e@macosforge.org> References: <051.0f79f32884e168bef5a43fae2e95614e@macosforge.org> Message-ID: <060.b3f964f95c26aafdf942a08ed29c678e@macosforge.org> #1048: Performance of Hash with an Array as a key ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: reopened => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: I think that trunk should now be as fast, if not faster, than MacRuby 0.8, and that performance regressions have been fixed. Therefore, I'm closing this bug for the 0.9 milestone. We do not intend to improve performance over CRuby for 1.0, as we prefer to focus on stability and compatibility instead. We will look at performance very seriously after 1.0. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 12 18:26:10 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 13 Jan 2011 02:26:10 -0000 Subject: [MacRuby] #1077: Performance of String In-Reply-To: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> References: <051.c357dd31501a71ffb1d663e2918e282a@macosforge.org> Message-ID: <060.4b860b17a826a9aeabc58ec50359be5f@macosforge.org> #1077: Performance of String ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby 1.0 => MacRuby 0.9 Comment: I think that trunk should now be as fast, if not faster, than MacRuby 0.8, and that performance regressions have been fixed. Therefore, I'm closing this bug for the 0.9 milestone. We do not intend to improve performance over CRuby for 1.0, as we prefer to focus on stability and compatibility instead. We will look at performance very seriously after 1.0. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 12 18:26:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 13 Jan 2011 02:26:15 -0000 Subject: [MacRuby] #1019: String#gsub performance In-Reply-To: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> References: <051.11f57c92908edfe5223c2a2387dd4300@macosforge.org> Message-ID: <060.1f8bc00f6042e20f86c0cc18596094ee@macosforge.org> #1019: String#gsub performance ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby 1.0 => MacRuby 0.9 Comment: I think that trunk should now be as fast, if not faster, than MacRuby 0.8, and that performance regressions have been fixed. Therefore, I'm closing this bug for the 0.9 milestone. We do not intend to improve performance over CRuby for 1.0, as we prefer to focus on stability and compatibility instead. We will look at performance very seriously after 1.0. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 12 19:01:51 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 13 Jan 2011 03:01:51 -0000 Subject: [MacRuby] #106: Syntax error with Variadic function In-Reply-To: <047.afc9e9192474fdd177a8c2522743d7bc@macosforge.org> References: <047.afc9e9192474fdd177a8c2522743d7bc@macosforge.org> Message-ID: <056.6f54fec1b49b6e45e6533e3360adb389@macosforge.org> #106: Syntax error with Variadic function ------------------------------+--------------------------------------------- Reporter: byblue@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: #reduction | ------------------------------+--------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby 1.0 => MacRuby 0.9 Comment: I added specs as r5161. This ticket can now be closed! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 13 06:38:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 13 Jan 2011 14:38:01 -0000 Subject: [MacRuby] #1066: TableView bug? In-Reply-To: <051.7cc7b8c8925366c538d8d328ea1de3a9@macosforge.org> References: <051.7cc7b8c8925366c538d8d328ea1de3a9@macosforge.org> Message-ID: <060.38cdf18bd896fc5ffc3db0180cf75086@macosforge.org> #1066: TableView bug? ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by bobstevenson@?): This one is also stopping me in my tracks. Is there any other possible workaround as I don't have a old AppKit.bridgesupport file to revert to...? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 13 12:39:24 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 13 Jan 2011 20:39:24 -0000 Subject: [MacRuby] #1066: TableView bug? In-Reply-To: <051.7cc7b8c8925366c538d8d328ea1de3a9@macosforge.org> References: <051.7cc7b8c8925366c538d8d328ea1de3a9@macosforge.org> Message-ID: <060.892ab4d31bef56ca62ccc669bf1ea4c3@macosforge.org> #1066: TableView bug? ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Fortunately, the BridgeSupport bug has been fixed today! I will roll out a new preview version of it this week. Thanks for your patience. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 13 15:32:10 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 13 Jan 2011 23:32:10 -0000 Subject: [MacRuby] #1114: Unable to use CATextLayer.font= which expects a CFTypeRef Message-ID: <054.9be0ca9377373ada2c1b6e9864974db6@macosforge.org> #1114: Unable to use CATextLayer.font= which expects a CFTypeRef -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- This is with BS preview 2. {{{ % macirb irb(main):001:0> framework 'QuartzCore' => true irb(main):004:0> framework 'AppKit' => true irb(main):005:0> font = NSFont.systemFontOfSize(NSFont.systemFontSize) => # irb(main):006:0> layer = CATextLayer.new => # irb(main):007:0> layer.font = font TypeError: expected instance of Pointer, got `#' (NSFont) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 13 17:11:12 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 14 Jan 2011 01:11:12 -0000 Subject: [MacRuby] #1110: macirb barfs on ->{} lambda syntax In-Reply-To: <050.0221f7606b2c062f8ef5ba5b3a9ff57a@macosforge.org> References: <050.0221f7606b2c062f8ef5ba5b3a9ff57a@macosforge.org> Message-ID: <059.5551847aeddf9102556a993b491b1f4c@macosforge.org> #1110: macirb barfs on ->{} lambda syntax ---------------------------------+------------------------------------------ Reporter: dev@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Changes (by lsansonetti@?): * milestone: => MacRuby 1.0 Comment: This needs to be fixed in 1.0. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 13 17:16:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 14 Jan 2011 01:16:32 -0000 Subject: [MacRuby] #1111: MacRuby throws an exception when undefine the String#length. In-Reply-To: <051.15c3febcfa906475c287575627a0dd71@macosforge.org> References: <051.15c3febcfa906475c287575627a0dd71@macosforge.org> Message-ID: <060.15aa4ab324d0d024d3e67c470d3683f6@macosforge.org> #1111: MacRuby throws an exception when undefine the String#length. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): That is expected: we cannot allow the user to change native methods such as NSString -length because it can cause unexpected crashes later in the process. However, as String is RubyString (a subclass), maybe this exception shouldn't be raised here. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 13 17:27:08 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 14 Jan 2011 01:27:08 -0000 Subject: [MacRuby] #1113: unexpected behaviour with enumerateObjectsUsingBlock In-Reply-To: <051.f3f1720f2a06ba10e47f9f9a9f4b8e71@macosforge.org> References: <051.f3f1720f2a06ba10e47f9f9a9f4b8e71@macosforge.org> Message-ID: <060.0a5091b66c1eb1e5e8b2b515c029c640@macosforge.org> #1113: unexpected behaviour with enumerateObjectsUsingBlock ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * milestone: => MacRuby 1.0 Comment: The problem is because the calling stub uses a global variable to store the proc and later call it. However, as calling stubs are cached by type, in this condition (messaging the same block method twice) overrides the global variable. This problem must be fixed in 1.0. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 13 18:04:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 14 Jan 2011 02:04:57 -0000 Subject: [MacRuby] #1115: Bundler not working since updating to rubygems 1.4.2 Message-ID: <053.7d95bd058a3a8bc22f84c31af128cc59@macosforge.org> #1115: Bundler not working since updating to rubygems 1.4.2 ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Whenever I have tried to use Bundler since the MacRuby trunk updated to rubygems 1.4.2 I always get a NameError: /Users/mrada/.rvm/gems/macruby- nightly/gems/bundler-1.0.7/lib/bundler/cli.rb:15:in `initialize': uninitialized constant Gem::SilentUI (NameError) from /Users/mrada/.rvm/gems/macruby- nightly/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch:' from /Users/mrada/.rvm/gems/macruby- nightly/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start' from /Users/mrada/.rvm/gems/macruby- nightly/gems/bundler-1.0.7/bin/bundle:13:in `
' from /Users/mrada/.rvm/gems/macruby-nightly/bin/bundle:19:in `
' [1] 8954 exit 1 bundle I do not get this error when I try to use bundler with rubygems 1.4.2 on Ruby 1.8 (the system ruby). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 13 18:22:25 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 14 Jan 2011 02:22:25 -0000 Subject: [MacRuby] #1113: unexpected behaviour with enumerateObjectsUsingBlock In-Reply-To: <051.f3f1720f2a06ba10e47f9f9a9f4b8e71@macosforge.org> References: <051.f3f1720f2a06ba10e47f9f9a9f4b8e71@macosforge.org> Message-ID: <060.59b62890c7cb2edaab1c8ebbdb3e46ee@macosforge.org> #1113: unexpected behaviour with enumerateObjectsUsingBlock ----------------------------------+----------------------------------------- Reporter: al_skipp@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby 1.0 => MacRuby 0.9 Comment: Should be fixed in r5163. C function pointers will suffer of the same problem, so a separate fix for them will be committed later. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 14 11:23:43 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 14 Jan 2011 19:23:43 -0000 Subject: [MacRuby] #472: built-in rss library doesn't work in HEAD In-Reply-To: <048.30245285bf17986588e577636241e7f5@macosforge.org> References: <048.30245285bf17986588e577636241e7f5@macosforge.org> Message-ID: <057.efbf9b66ae621872c364225e5c531ba9@macosforge.org> #472: built-in rss library doesn't work in HEAD -------------------------------+-------------------------------------------- Reporter: sergio@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- Comment(by pthomson@?): Printing out the names of the classes expected gives a surprising result: {{{ superclass mismatch for class RSS::Maker::RSS10::TaxonomyTopics - got RSS::Maker::TaxonomyTopicModel::TaxonomyTopicsBase, expected RSS::Maker::TaxonomyTopicsModel::TaxonomyTopicsBase }}} Apparently there are two instances of TaxonomyTopicsBase at two different locations in memory. Mysterious. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 14 11:42:40 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 14 Jan 2011 19:42:40 -0000 Subject: [MacRuby] #1110: macirb barfs on ->{} lambda syntax In-Reply-To: <050.0221f7606b2c062f8ef5ba5b3a9ff57a@macosforge.org> References: <050.0221f7606b2c062f8ef5ba5b3a9ff57a@macosforge.org> Message-ID: <059.aef06158319f5fe1cfa6f6c85a57fef2@macosforge.org> #1110: macirb barfs on ->{} lambda syntax ---------------------------------+------------------------------------------ Reporter: dev@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by pthomson@?): Looks like the problem is in our version of Ripper: {{{ p Ripper.sexp("->{}") }}} prints nil. It works on 1.9. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 14 11:43:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 14 Jan 2011 19:43:01 -0000 Subject: [MacRuby] #1110: ripper does not parse ->{} lambda syntax correctly (was: macirb barfs on ->{} lambda syntax) In-Reply-To: <050.0221f7606b2c062f8ef5ba5b3a9ff57a@macosforge.org> References: <050.0221f7606b2c062f8ef5ba5b3a9ff57a@macosforge.org> Message-ID: <059.79b974920293b1e1dc16e6171fa6f708@macosforge.org> #1110: ripper does not parse ->{} lambda syntax correctly ---------------------------------+------------------------------------------ Reporter: dev@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 14 19:10:27 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 15 Jan 2011 03:10:27 -0000 Subject: [MacRuby] #1115: Bundler not working since updating to rubygems 1.4.2 In-Reply-To: <053.7d95bd058a3a8bc22f84c31af128cc59@macosforge.org> References: <053.7d95bd058a3a8bc22f84c31af128cc59@macosforge.org> Message-ID: <062.9a9acebf7c09d4040fd4a287dc8254d0@macosforge.org> #1115: Bundler not working since updating to rubygems 1.4.2 ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@?): In RubyGems 1.4.2, the Gem::SilentUI class, defined in the rubygens/user_interaction.rb file, is only loaded lazily, when Gem.ui is called. {{{ ## # Lazily loads DefaultUserInteraction and returns the default UI. def self.ui require 'rubygems/user_interaction' Gem::DefaultUserInteraction.ui end }}} Apparently, the bundler library never calls Gem.ui. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 14 19:58:50 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 15 Jan 2011 03:58:50 -0000 Subject: [MacRuby] #1115: Bundler not working since updating to rubygems 1.4.2 In-Reply-To: <053.7d95bd058a3a8bc22f84c31af128cc59@macosforge.org> References: <053.7d95bd058a3a8bc22f84c31af128cc59@macosforge.org> Message-ID: <062.24a4e2880093df799c1c2cf0d686b1d2@macosforge.org> #1115: Bundler not working since updating to rubygems 1.4.2 ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Okay, I didn't merge RubyGems 1.4.2 properly, because I suck at Git. It should be fine with r5167. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 15 07:33:14 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 15 Jan 2011 15:33:14 -0000 Subject: [MacRuby] #542: Attempt to unlock a mutex which is not locked (ThreadError) In-Reply-To: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> References: <054.1a4ef5ffee450b4e3f8e1220d38c91ee@macosforge.org> Message-ID: <063.7522d3f6a3b43b5d76d9f40f9d383057@macosforge.org> #542: Attempt to unlock a mutex which is not locked (ThreadError) -------------------------------------+-------------------------------------- Reporter: valerii.hiora@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by jhemmelg@?): I think I have a possible reduction for this problem. I was prototyping some thread code for work and tried it out on macruby version 0.8. It acts like a race condition. Mostly it manifests with the error about unlocking an unlocked mutex, but I have had it end up with the mutex locked and the threads blocked. Here is a sample of running the script: {{{ $ macruby testThreadComm.rb 0 ^C $ macruby testThreadComm.rb 0 1251879 2504224 3709045 5051891 6291455 7625310 8934016 $ macruby testThreadComm.rb 0 1315628 2659968 3938967 testThreadComm.rb:62:in `
': Attempt to unlock a mutex which is not locked (ThreadError) }}} The first time the program locked up and I had to kill it. I assume the mutex was locked, blocking progress on either thread. The second invocation is a clean run, and the third ends with the mutex being unlocked when it shouldn't be. Most of the time it completes without a problem. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 15 16:20:27 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 16 Jan 2011 00:20:27 -0000 Subject: [MacRuby] #1115: Bundler not working since updating to rubygems 1.4.2 In-Reply-To: <053.7d95bd058a3a8bc22f84c31af128cc59@macosforge.org> References: <053.7d95bd058a3a8bc22f84c31af128cc59@macosforge.org> Message-ID: <062.eccd5391bb2a87a90bc075b556bee6eb@macosforge.org> #1115: Bundler not working since updating to rubygems 1.4.2 ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Comment(by mrada@?): It is working now. Thanks! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 16 10:22:04 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 16 Jan 2011 18:22:04 -0000 Subject: [MacRuby] #1116: Yet another String performance issue Message-ID: <051.b82f70b2e6e45218a32f52405d0b25e2@macosforge.org> #1116: Yet another String performance issue ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Another String performance issue. Tested on a text file with 4360 lines (\n). {{{ Test 1 - File.read("test.txt").split(/\n/) Test 2 - File.read("test.txt").split("\n") Test 1 - force_encoding - File.read("test.txt").force_encoding("UTF- 16BE").split(/\n/) Test 2 - force_encoding - File.read("test.txt").force_encoding("UTF- 16BE").split("\n".force_encoding("UTF-16BE")) Test 3 - File.read("test.txt").lines {} }}} {{{ Ruby 1.8.7 Test 1 - 0.0081 0.0078 0.0086 Test 2 - 0.0078 0.0079 0.0079 Test 3 - 0.0058 0.0053 0.0065 Ruby 1.9.2 Test 1 - 0.0089 0.0090 0.0089 Test 2 - 0.0035 0.0035 0.0035 Test 3 - 0.0036 0.0035 0.0035 MacRuby 0.8 2011/01/16 Test 1 - 0.026 0.039 0.023 Test 2 - 0.019 0.018 0.018 Test 3 - 0.023 0.020 0.026 MacRuby 0.9 2011/01/16 Test 1 - 0.021 0.021 0.021 Test 2 - 23.51 23.55 23.50 Test 3 - 23.43 23.38 23.35 MacRuby 0.9 2011/01/16 - force_encoding Test 1 - 0.015 0.015 0.015 Test 2 - 0.011 0.011 0.011 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 16 10:23:08 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 16 Jan 2011 18:23:08 -0000 Subject: [MacRuby] #1116: Yet another String performance issue In-Reply-To: <051.b82f70b2e6e45218a32f52405d0b25e2@macosforge.org> References: <051.b82f70b2e6e45218a32f52405d0b25e2@macosforge.org> Message-ID: <060.ad7fd8feadb55301d59d3dc7222cb0bf@macosforge.org> #1116: Yet another String performance issue ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): I forgot to mention that the original text only included ASCII characters. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 17 15:38:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 17 Jan 2011 23:38:35 -0000 Subject: [MacRuby] #1117: Garbage collection issues Message-ID: <054.59a2440144e0496502fd8951a12126b0@macosforge.org> #1117: Garbage collection issues -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Install: {{{ % git clone git at github.com:alloy/mocha-on-bacon.git Initialized empty Git repository in /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/.git/ remote: Counting objects: 42, done. remote: Compressing objects: 100% (34/34), done. remote: Total 42 (delta 13), reused 0 (delta 0) Receiving objects: 100% (42/42), 8.15 KiB, done. Resolving deltas: 100% (13/13), done. % cd mocha-on-bacon % sudo macgem install mac_bacon Password: Successfully installed mac_bacon-1.1.21 1 gem installed % sudo macgem install mocha --format-executable Successfully installed rake-0.8.7 Successfully installed mocha-0.9.10 2 gems installed }}} Running with GC, results in: {{{ % macbacon spec/mocha-on-bacon_spec.rb Bacon specs using Mocha, with a mock - passes when all expectations were fulfilled - fails when not all expectations were fulfilled - fails when there is an unexpected invocation - passes when the mockee receives all expected parametersmacruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c90420)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c903c0)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug - fails when the mockee receives unexpected parameters and complains about not being satisfiedmacruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative- block}[96](0x200c9b8c0)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c9b800)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c9b620)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c903c0)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200be9260 while assigning {conservative-block}[96](0x200c9f200)[16] = RBSpecification[32](0x200be9260) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200bee780 while assigning {conservative-block}[96](0x200c9b620)[16] = RBSpecification[32](0x200bee780) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200bee780 while assigning {conservative-block}[96](0x200c903c0)[16] = RBSpecification[32](0x200bee780) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200bee780 while assigning {conservative-block}[96](0x200c9f200)[16] = RBSpecification[32](0x200bee780) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug [FAILED] - fails when the mockee receives unexpected parameters and complains about the unexpected parameters Bacon specs using Mocha, with a stubmacruby(90645,0x105181000) malloc: resurrection error for object 0x200bdeb20 while assigning {conservative- block}[96](0x200c97140)[16] = RBSpecification[32](0x200bdeb20) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200bdeb20 while assigning {conservative-block}[96](0x200c970e0)[16] = RBSpecification[32](0x200bdeb20) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200bdeb20 while assigning {conservative-block}[96](0x200c97020)[16] = RBSpecification[32](0x200bdeb20) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug [MISSING] macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8c920 while assigning {conservative-block}[96](0x200c97140)[16] = RBSpecification[32](0x200c8c920) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8c920 while assigning {conservative-block}[96](0x200c970e0)[16] = RBSpecification[32](0x200c8c920) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8c920 while assigning {conservative-block}[96](0x200c97020)[16] = RBSpecification[32](0x200c8c920) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug [MISSING] macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8dd00 while assigning {conservative-block}[96](0x200c93fc0)[16] = RBSpecification[32](0x200c8dd00) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8dd00 while assigning {conservative-block}[96](0x200c970e0)[16] = RBSpecification[32](0x200c8dd00) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8dd00 while assigning {conservative-block}[96](0x200c97140)[16] = RBSpecification[32](0x200c8dd00) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8dd00 while assigning {conservative-block}[96](0x200c970e0)[16] = RBSpecification[32](0x200c8dd00) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug macruby(90645,0x105181000) malloc: resurrection error for object 0x200c8dd00 while assigning {conservative-block}[96](0x200c97020)[16] = RBSpecification[32](0x200c8dd00) garbage pointer stored into reachable memory, break on auto_zone_resurrection_error to debug - passes when all Stubba expectations are fulfilled [MISSING] - fails when not all Stubba expectations were fulfilled [MISSING] Bacon::Error: /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:426:in `satisfy': Bacon specs using Mocha, with a mock - fails when the mockee receives unexpected parameters and complains about not being satisfied /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:409:in `have:' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/spec /mocha-on-bacon_spec.rb:37:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:158:in `block' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:30:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:195:in `execute_block_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:28:in `execute_block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:154:in `run_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:23:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:234:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/bin/macbacon:118:in `
' /usr/bin/macbacon:19:in `
' Bacon::Error: empty specification: Bacon specs using Mocha, with a stub passes when all Stubba expectations are fulfilled /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:183:in `block': Bacon specs using Mocha, with a stub - passes when all Stubba expectations are fulfilled /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:30:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:195:in `execute_block_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:28:in `execute_block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:183:in `finalize_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:45:in `finalize' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:161:in `run_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:23:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:234:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:242:in `context_did_finish:' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:284:in `specification_did_finish:' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:190:in `finalize_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:45:in `finalize' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:161:in `run_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:23:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:234:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/bin/macbacon:118:in `
' /usr/bin/macbacon:19:in `
' Bacon::Error: empty specification: Bacon specs using Mocha, with a stub fails when not all Stubba expectations were fulfilled /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:183:in `block': Bacon specs using Mocha, with a stub - fails when not all Stubba expectations were fulfilled /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:30:in `block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:195:in `execute_block_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:28:in `execute_block' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:183:in `finalize_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:45:in `finalize' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:161:in `run_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:23:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:234:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:242:in `context_did_finish:' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:284:in `specification_did_finish:' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:190:in `finalize_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:45:in `finalize' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:161:in `run_before_mocha' /Users/eloy/Documents/DEVELOPMENT/MacRuby/mocha-on-bacon/lib /mocha-on-bacon.rb:23:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/lib/mac_bacon.rb:234:in `run' /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2/gems/mac_bacon-1.1.23/bin/macbacon:118:in `
' /usr/bin/macbacon:19:in `
' 8 specifications (6 requirements), 1 failures, 0 errors }}} However, with GC disabled everything is fine: {{{ % GC_DISABLE=true macbacon spec/mocha-on-bacon_spec.rb Bacon specs using Mocha, with a mock - passes when all expectations were fulfilled - fails when not all expectations were fulfilled - fails when there is an unexpected invocation - passes when the mockee receives all expected parameters - fails when the mockee receives unexpected parameters and complains about not being satisfied - fails when the mockee receives unexpected parameters and complains about the unexpected parameters Bacon specs using Mocha, with a stub - passes when all Stubba expectations are fulfilled - fails when not all Stubba expectations were fulfilled 8 specifications (8 requirements), 0 failures, 0 errors }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 17 18:10:47 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 18 Jan 2011 02:10:47 -0000 Subject: [MacRuby] #1116: Yet another String performance issue In-Reply-To: <051.b82f70b2e6e45218a32f52405d0b25e2@macosforge.org> References: <051.b82f70b2e6e45218a32f52405d0b25e2@macosforge.org> Message-ID: <060.4e01de8208581645bc180fc89aa164be@macosforge.org> #1116: Yet another String performance issue ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): I improved the performance of String#split and String#lines as of r5181. Can you retry? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 17 18:40:07 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 18 Jan 2011 02:40:07 -0000 Subject: [MacRuby] #1057: Redefine of ! is ignored In-Reply-To: <049.549727a7361f4442d05ab527fe3d4e32@macosforge.org> References: <049.549727a7361f4442d05ab527fe3d4e32@macosforge.org> Message-ID: <058.bbcd02a80282b3c8bff545b2eb9f8a70@macosforge.org> #1057: Redefine of ! is ignored --------------------------------+------------------------------------------- Reporter: mjkaelbling@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby Later Component: MacRuby | Keywords: ! def redefine ignored --------------------------------+------------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.8 => MacRuby Later Comment: For Later. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 17 19:36:28 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 18 Jan 2011 03:36:28 -0000 Subject: [MacRuby] #715: public_method_defined? on a metaclass doesn't work In-Reply-To: <054.51d07a738fb667b4ded33978e2333c2d@macosforge.org> References: <054.51d07a738fb667b4ded33978e2333c2d@macosforge.org> Message-ID: <063.99795687c1a07c5d25ac11b75659eeae@macosforge.org> #715: public_method_defined? on a metaclass doesn't work -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: mocha -------------------------------------+-------------------------------------- Comment(by watson1978@?): It seems to work well ;) I checked with r5180. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 18 06:12:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 18 Jan 2011 14:12:35 -0000 Subject: [MacRuby] #704: Singleton bug with define_method In-Reply-To: <049.cf9b38abba45491bcc7916bf57dc5989@macosforge.org> References: <049.cf9b38abba45491bcc7916bf57dc5989@macosforge.org> Message-ID: <058.109861c09cc792034c53d007d319ea58@macosforge.org> #704: Singleton bug with define_method --------------------------------+------------------------------------------- Reporter: mike@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by watson1978@?): It seems that this issue occurs to use the same variable name in argument of #instance_exec and argument of block of #instance_exec. Test script works when I change it as follows: {{{ singleton.instance_exec(name) do |m| # # changed name -> m define_method("#{m}=") do |value| puts "Setting #{m} to #{value}" @values[m] = value end define_method("#{m}") do return @values[m] end end }}} I also think this issue is unrelated to define_method. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 18 07:54:41 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 18 Jan 2011 15:54:41 -0000 Subject: [MacRuby] #1116: Yet another String performance issue In-Reply-To: <051.b82f70b2e6e45218a32f52405d0b25e2@macosforge.org> References: <051.b82f70b2e6e45218a32f52405d0b25e2@macosforge.org> Message-ID: <060.008ec04f9f9f7f89672a1c88aab5751e@macosforge.org> #1116: Yet another String performance issue ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@?): I tested this with the latest nightly and now it is as fast as or slightly faster than 0.8! {{{ MacRuby 0.9 nightly 2011/01/18 Test 1 - 0.019 0.019 0.019 Test 2 - 0.015 0.015 0.015 Test 3 - 0.014 0.014 0.014 }}} This is great! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 18 09:01:50 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 18 Jan 2011 17:01:50 -0000 Subject: [MacRuby] #1118: Object.instance_methods does not return the :hash or :class methods Message-ID: <059.ed5bf1b20449866fbe6172f0386c5adc@macosforge.org> #1118: Object.instance_methods does not return the :hash or :class methods ------------------------------------------+--------------------------------- Reporter: smorss@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- I am running MacRuby 0.8. If I run "Object.instance_methods", it returns: [:clear_history!, :h!, :history!, :h, :history, :to_plist, :Complex, :Rational, :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, :inspect, :to_s, :untrusted?, :untrust, :trust, :frozen?, :freeze, :untaint, :tainted?, :taint, :__type__, :dup, :clone, :<=>, :eql?, :!~, :=~, :===, :nil?, :!=, :!, :==, :equal?] The :hash and :class methods are missing. If I run "Object.new.methods", the result does not include the :class or :hash methods either. Still, the two methods are callable (e.g. "Object.new.class" returns NSObject). Subclasses of Object(NSObject), do include the :class and :hash methods in their instance methods. It's just the Object(NSObject) class with the odd behavior. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 18 10:04:17 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 18 Jan 2011 18:04:17 -0000 Subject: [MacRuby] #1119: Object initalize with a variable length argument shows up as a public method Message-ID: <059.891abdac953b3a8c1202ca6d2b035521@macosforge.org> #1119: Object initalize with a variable length argument shows up as a public method ------------------------------------------+--------------------------------- Reporter: smorss@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- I am running MacRuby 0.8. If I create a class with an initialize method that takes a variable length argument: class XX ; def initialize (*x) ; end ; end then "XX.new.methods" includes :initialize (to test this, try it in its own file or a new macirb session, so there are no other classes defined). initialize should not show up as a public method. If I try to call the method (e.g. "XX.new.initialize"), it has the proper behavior (says it can't, because initialize is private). If I create another XX instance, but pass a parameter, e.g. "XX.new(1).methods", :initialize goes away. If I call "XX.new.methods" again, :initialize is no longer there as well (feels like a Ruby class initialization problem). If I start from scratch and run the same line twice in the same session: class XX ; def initialize (*x) ; end ; end class XX ; def initialize (*x) ; end ; end then "XX.new.methods" no longer contains the initialize method (has the correct behavior). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 18 10:17:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 18 Jan 2011 18:17:34 -0000 Subject: [MacRuby] #1120: User defined classes created with singleton methods Message-ID: <059.80a2e12edb5d9ed8e459ebeab6638261@macosforge.org> #1120: User defined classes created with singleton methods ------------------------------------------+--------------------------------- Reporter: smorss@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- I am running MacRuby 0.8. If I create a simple class: class X ; end And then I ask an instance of it for its singleton methods: X.new.singleton_methods I get: [:==, :class, :hash, :dup] There shouldn't be any (should return []). "Object.new.singleton_methods" has the correct behavior. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 18 12:56:02 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 18 Jan 2011 20:56:02 -0000 Subject: [MacRuby] #1116: Yet another String performance issue In-Reply-To: <051.b82f70b2e6e45218a32f52405d0b25e2@macosforge.org> References: <051.b82f70b2e6e45218a32f52405d0b25e2@macosforge.org> Message-ID: <060.cf3be0cdc9c7f6026240ed128c5c540f@macosforge.org> #1116: Yet another String performance issue ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Thanks for checking :) I'm therefore closing this bug. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 18 15:32:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 18 Jan 2011 23:32:53 -0000 Subject: [MacRuby] #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) Message-ID: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- With r5182, assertion fails as following command. It works until r5178 without assertion. {{{ On MacRuby source directory: $ cd test/test-mri/ $ macruby -r require_relative.rb test/csv/test_encodings.rb ---------------------------------------- Loaded suite test/csv/test_encodings Started ...E.FFEE.....EAssertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes), function str_index_for_string_with_cache, file string.c, line 1151. zsh: abort macruby -r require_relative.rb test/csv/test_encodings.rb $ macruby -r require_relative.rb test/ruby/test_m17n.rb ---------------------------------------- Loaded suite test/ruby/test_m17n Started F..EFEFE.EFF..EEEE..F.FE.E...EE.FFFAssertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes), function str_index_for_string_with_cache, file string.c, line 1151. zsh: abort macruby -r require_relative.rb test/ruby/test_m17n.rb }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 18 16:04:33 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 19 Jan 2011 00:04:33 -0000 Subject: [MacRuby] #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) In-Reply-To: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> References: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> Message-ID: <060.8c3a55552423d1c47218a7d46ba6fc36@macosforge.org> #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): OK, this code must be removed. It is simpler and even faster to return the character index from the search method instead of trying to guess it. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 18 17:09:42 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 19 Jan 2011 01:09:42 -0000 Subject: [MacRuby] #1066: TableView bug? In-Reply-To: <051.7cc7b8c8925366c538d8d328ea1de3a9@macosforge.org> References: <051.7cc7b8c8925366c538d8d328ea1de3a9@macosforge.org> Message-ID: <060.0bf7d0bdf1fd697850c5f025c7fea2fb@macosforge.org> #1066: TableView bug? ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby 1.0 => Comment: Should be fixed in BridgeSupport Preview 3. It can be downloaded here: http://www.macruby.org/files/BridgeSupport%20Preview%203.zip -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 19 06:11:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 19 Jan 2011 14:11:34 -0000 Subject: [MacRuby] #1066: TableView bug? In-Reply-To: <051.7cc7b8c8925366c538d8d328ea1de3a9@macosforge.org> References: <051.7cc7b8c8925366c538d8d328ea1de3a9@macosforge.org> Message-ID: <060.4ac7e5ae4ded81aa7587868e5df9c30f@macosforge.org> #1066: TableView bug? ----------------------------------+----------------------------------------- Reporter: yasuimao@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Comment(by yasuimao@?): Yes, this seems to be fixed, at least on my app. Great! -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 19 23:26:05 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 20 Jan 2011 07:26:05 -0000 Subject: [MacRuby] #1122: Inspection of NSArray stops at unicode char Message-ID: <045.4987c1ec7b16bd54281e0635abc57fbb@macosforge.org> #1122: Inspection of NSArray stops at unicode char ----------------------------+----------------------------------------------- Reporter: jazzbox@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------+----------------------------------------------- I am running the nightly build: {{{ $ cat fail.rb a = %w{Januar Februar M?rz April} p a b = NSArray.arrayWithArray(a) puts b.join ", " p b }}} {{{ $ macruby fail.rb ["Januar", "Februar", "M?rz", "April"] Januar, Februar, M?rz, April ["Januar", "Februar", "M? }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 20 03:39:28 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 20 Jan 2011 11:39:28 -0000 Subject: [MacRuby] #1122: Inspection of NSArray stops at unicode char In-Reply-To: <045.4987c1ec7b16bd54281e0635abc57fbb@macosforge.org> References: <045.4987c1ec7b16bd54281e0635abc57fbb@macosforge.org> Message-ID: <054.10a7d7eeb65b2fa5ac3b2219d1eb1dcc@macosforge.org> #1122: Inspection of NSArray stops at unicode char ----------------------------+----------------------------------------------- Reporter: jazzbox@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------+----------------------------------------------- Comment(by vincent.isambart@?): Should be fixed in r5184 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 20 12:58:09 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 20 Jan 2011 20:58:09 -0000 Subject: [MacRuby] #1122: Inspection of NSArray stops at unicode char In-Reply-To: <045.4987c1ec7b16bd54281e0635abc57fbb@macosforge.org> References: <045.4987c1ec7b16bd54281e0635abc57fbb@macosforge.org> Message-ID: <054.49b36203a7fb8c881c89ee8be14d5e5b@macosforge.org> #1122: Inspection of NSArray stops at unicode char ----------------------------+----------------------------------------------- Reporter: jazzbox@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------+----------------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 20 21:26:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 21 Jan 2011 05:26:15 -0000 Subject: [MacRuby] #1123: does not process the "ensure" when called the "next". Message-ID: <051.5e00d7652fdf4d789ce549eb20409c88@macosforge.org> #1123: does not process the "ensure" when called the "next". ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby $result = [] [1, 2, 3].each do |i| begin $result << i next ensure $result << :ensure end end p $result }}} Result: {{{ $ ruby19 test.rb [1, :ensure, 2, :ensure, 3, :ensure] $ macruby test.rb [1, 2, 3] }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 24 21:18:41 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 05:18:41 -0000 Subject: [MacRuby] #1124: string.ord returns 0xFFFF for all characters 0x80 or greater in binary string Message-ID: <059.f813e6ccb92b0bc245e3e772a369b012@macosforge.org> #1124: string.ord returns 0xFFFF for all characters 0x80 or greater in binary string ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- This problem was introduced with changeset r5054. Here's some test code: {{{ ary = [] "\x00\x01\x7F\x80".each_char { |c| ary << (c.ord & 0xff) } if ary == [0,1,127,128] puts "Looks good" else puts "Expected [0,1,127,128], got [#{ary.join(',')}]" end }}} When run on MacRuby r5053: {{{ Looks good }}} When run on MacRuby r5054 through r5187: {{{ Expected [0,1,127,128], got [0,1,127,255] }}} When run on CRuby 1.9.2: {{{ Looks good }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 24 22:16:53 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 06:16:53 -0000 Subject: [MacRuby] #1124: string.ord returns 0xFFFF for all characters 0x80 or greater in binary string In-Reply-To: <059.f813e6ccb92b0bc245e3e772a369b012@macosforge.org> References: <059.f813e6ccb92b0bc245e3e772a369b012@macosforge.org> Message-ID: <068.c0fa8e187e781ec2721c148cec3da8df@macosforge.org> #1124: string.ord returns 0xFFFF for all characters 0x80 or greater in binary string ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: vincent.isambart@? Type: defect | Status: new Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- Changes (by vincent.isambart@?): * owner: lsansonetti@? => vincent.isambart@? Comment: In fact both results are incorrect. Running it in 1.9 (adding {{{#coding: utf-8}}} at the start line of the file) raises an "invalid byte sequence in UTF-8 (ArgumentError)". I don't have MacRuby handy, but looking at the source code there are a few differences with the behavior of 1.9: * {{{String#each_char}}} and {{{String#ord}}} do not throw an exception when the encoding is invalid * {{{String#ord}}} in ASCII-8BIT returns 0xFFFF for non ASCII-characters (it should simply return the byte value) Note that to iterate other the bytes of a string, you should use {{{String#each_byte}}} instead of {{{String#each_char}}}. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 24 23:25:10 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 07:25:10 -0000 Subject: [MacRuby] #1125: case insensitive fs require bug Message-ID: <054.c5f753e3567c0e951c0e51b757ab6c24@macosforge.org> #1125: case insensitive fs require bug -------------------------------------+-------------------------------------- Reporter: mattaimonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- {{{ $ macruby -e "require 'URI'; require 'net/http'" Assertion failed: (__mrep__ != NULL), function dln_load, file dln.c, line 126. Abort trap }}} {{{ $ macruby -e "require 'uri'; require 'net/http'" >> ponies, rainbows and unicorns }}} {{{ $ macruby -r URI -r uri -e '' Assertion failed: (__mrep__ != NULL), function dln_load, file dln.c, line 126. Abort trap }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 25 02:38:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 10:38:35 -0000 Subject: [MacRuby] #361: Embed MacRuby Target Adds 60+ MB to .app In-Reply-To: <050.572b3571708c100e8e310b9c06e29519@macosforge.org> References: <050.572b3571708c100e8e310b9c06e29519@macosforge.org> Message-ID: <059.a7e01b8f59bd6734cabe411789903de2@macosforge.org> #361: Embed MacRuby Target Adds 60+ MB to .app ---------------------------------+------------------------------------------ Reporter: dylan@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------+------------------------------------------ Comment(by josh.kalderimis@?): I know this is an old issue but I was wondering if there had been any recent efforts to further reduce the size of embedded macruby apps? -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 25 03:06:29 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 11:06:29 -0000 Subject: [MacRuby] #1124: string.ord returns 0xFFFF for all characters 0x80 or greater in binary string In-Reply-To: <059.f813e6ccb92b0bc245e3e772a369b012@macosforge.org> References: <059.f813e6ccb92b0bc245e3e772a369b012@macosforge.org> Message-ID: <068.f8edd3a84753d231cc4e80cbe2d034a1@macosforge.org> #1124: string.ord returns 0xFFFF for all characters 0x80 or greater in binary string ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: vincent.isambart@? Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------------+--------------------------------- Changes (by vincent.isambart@?): * status: new => closed * resolution: => fixed Comment: Should be fixed in r5188. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 25 03:45:29 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 11:45:29 -0000 Subject: [MacRuby] #1124: string.ord returns 0xFFFF for all characters 0x80 or greater in binary string In-Reply-To: <059.f813e6ccb92b0bc245e3e772a369b012@macosforge.org> References: <059.f813e6ccb92b0bc245e3e772a369b012@macosforge.org> Message-ID: <068.abff0ce4ffa6861f2be3d08753911d08@macosforge.org> #1124: string.ord returns 0xFFFF for all characters 0x80 or greater in binary string ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: vincent.isambart@? Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------------+--------------------------------- Comment(by vincent.isambart@?): Sorry I made a mistake in r5188, should be OK in r5189. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 25 11:55:05 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 19:55:05 -0000 Subject: [MacRuby] #769: String::ord with packed array in MacRuby In-Reply-To: <050.25cbb5badbd04c3749d8f3b9e14e507e@macosforge.org> References: <050.25cbb5badbd04c3749d8f3b9e14e507e@macosforge.org> Message-ID: <059.3412a6592a081067d5fafb467ab572e7@macosforge.org> #769: String::ord with packed array in MacRuby ---------------------------------+------------------------------------------ Reporter: babs.devs@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby Later Component: MacRuby | Keywords: binary, pack, ord, ordinal, String, String::ord ---------------------------------+------------------------------------------ Comment(by justin@?): It looks like this may have been fixed by r5188 and r5189 -- I get a value of 148 for the .ord now. Not sure about the segfault. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 25 13:27:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 21:27:01 -0000 Subject: [MacRuby] #769: String::ord with packed array in MacRuby In-Reply-To: <050.25cbb5badbd04c3749d8f3b9e14e507e@macosforge.org> References: <050.25cbb5badbd04c3749d8f3b9e14e507e@macosforge.org> Message-ID: <059.e34bc189740e7237fee685886951f147@macosforge.org> #769: String::ord with packed array in MacRuby -------------------------------------------------------------+-------------- Reporter: babs.devs@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby Later Component: MacRuby | Resolution: fixed Keywords: binary, pack, ord, ordinal, String, String::ord | -------------------------------------------------------------+-------------- Changes (by vincent.isambart@?): * status: new => closed * resolution: => fixed Comment: In r5190 I fixed how p displayed "\xBA" (I broke it in r5188), the code now displays exactly the same output as 1.9, and I don't get any crash so I'll close this ticket. If you still get crashes please open a new ticket with the description of how to reproduce it. Note that to deal with bytes you have the each_byte, getbyte and setbyte methods. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 25 14:59:39 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 22:59:39 -0000 Subject: [MacRuby] #1126: iokit support Message-ID: <047.1159e00e7fa47e27451f3a27c0260efe@macosforge.org> #1126: iokit support ------------------------------+--------------------------------------------- Reporter: joelr1@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: ------------------------------+--------------------------------------------- No IOKit support exists for MacRuby at the moment so it's not possible to use MacRuby to write, for example, user-land USB drivers. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 25 15:06:49 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 23:06:49 -0000 Subject: [MacRuby] #1076: Abort occurs when raise a SecurityError within Thread. In-Reply-To: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> References: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> Message-ID: <060.4e1e622a79be79b10a9bacfef03bbe97@macosforge.org> #1076: Abort occurs when raise a SecurityError within Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): I think that should not raise an exception in rb_thread_remove_from_group(). Because the exception of rb_thread_remove_from_group() is not caught within rb_vm_thread_run(). Patch: {{{ #!diff diff --git a/NSArray.m b/NSArray.m index 8916881..b1c714e 100644 --- a/NSArray.m +++ b/NSArray.m @@ -1280,6 +1280,17 @@ rb_ary_delete(VALUE ary, VALUE item) } VALUE +rb_ary_delete_force(VALUE ary, VALUE item) +{ + if (IS_RARY(ary)) { + return rary_delete_force(ary, 0, item); + } + else { + return nsary_delete((id)ary, 0, item); + } +} + +VALUE rb_ary_delete_at(VALUE ary, long pos) { if (IS_RARY(ary)) { diff --git a/array.c b/array.c index 2c1c486..2cd818c 100644 --- a/array.c +++ b/array.c @@ -1854,6 +1854,15 @@ rary_delete(VALUE ary, SEL sel, VALUE item) return item; } +VALUE +rary_delete_force(VALUE ary, SEL sel, VALUE item) +{ + if (rary_delete_element(ary, item, true) == false) { + return Qnil; + } + return item; +} + /* * call-seq: * array.delete_at(index) -> obj or nil diff --git a/array.h b/array.h index 4f44716..fb4419a 100644 --- a/array.h +++ b/array.h @@ -146,6 +146,7 @@ VALUE rary_clear(VALUE ary, SEL sel); VALUE rary_reverse_bang(VALUE ary, SEL sel); VALUE rary_includes(VALUE ary, SEL sel, VALUE item); VALUE rary_delete(VALUE ary, SEL sel, VALUE item); +VALUE rary_delete_force(VALUE ary, SEL sel, VALUE item); VALUE rary_delete_at(VALUE ary, SEL sel, VALUE pos); VALUE rary_pop(VALUE ary, SEL sel, int argc, VALUE *argv); VALUE rary_shift(VALUE ary, SEL sel, int argc, VALUE *argv); diff --git a/macruby_internal.h b/macruby_internal.h index 53fad7b..484e857 100644 --- a/macruby_internal.h +++ b/macruby_internal.h @@ -103,6 +103,8 @@ VALUE rb_io_addstr(VALUE, SEL, VALUE); VALUE rb_io_printf(VALUE, SEL, int, VALUE *); VALUE rb_io_print(VALUE, SEL, int, VALUE *); +VALUE rb_ary_delete_force(VALUE ary, VALUE item); + VALUE rb_objc_num_coerce_bin(VALUE x, VALUE Y, SEL sel); VALUE rb_objc_num_coerce_cmp(VALUE, VALUE, SEL sel); VALUE rb_objc_num_coerce_relop(VALUE, VALUE, SEL sel); diff --git a/thread.c b/thread.c index 5c6296b..476c642 100644 --- a/thread.c +++ b/thread.c @@ -1329,7 +1329,7 @@ rb_thread_remove_from_group(VALUE thread) if (t->group != Qnil) { rb_thread_group_t *tg = GetThreadGroupPtr(t->group); thgroup_lock(tg); - if (rb_ary_delete(tg->threads, thread) != thread) { + if (rb_ary_delete_force(tg->threads, thread) != thread) { printf("trying to remove a thread (%p) from a group that doesn't "\ "contain it\n", (void *)thread); abort(); }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 25 15:09:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 25 Jan 2011 23:09:35 -0000 Subject: [MacRuby] #1076: Abort occurs when raise a SecurityError within Thread. In-Reply-To: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> References: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> Message-ID: <060.0bcf0eda31bbec3d133477382f0acc3f@macosforge.org> #1076: Abort occurs when raise a SecurityError within Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): I think it would be cleaner to just rescue the exception in thread.c. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 25 16:31:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 26 Jan 2011 00:31:48 -0000 Subject: [MacRuby] #1127: Access to freed memory in rb_vm_dispatch Message-ID: <059.1df478b5024baecf81adb8c86da766eb@macosforge.org> #1127: Access to freed memory in rb_vm_dispatch ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- Patch attached. I have not been able to create a test case that produces this crash, but my application was experiencing random crashing quite frequently. Application is multithreaded which probably increases the odds that the memory is re-allocated before the dispatcher tries to access it illegally. Crashing stopped after patch. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Tue Jan 25 16:43:39 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 26 Jan 2011 00:43:39 -0000 Subject: [MacRuby] #1127: Access to freed memory in rb_vm_dispatch In-Reply-To: <059.1df478b5024baecf81adb8c86da766eb@macosforge.org> References: <059.1df478b5024baecf81adb8c86da766eb@macosforge.org> Message-ID: <068.b40a9128b3c4c4172ac217c59c51be70@macosforge.org> #1127: Access to freed memory in rb_vm_dispatch ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------------+--------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed Comment: Ouch, that's embarrassing. Thanks for the patch! It has been applied as r5191. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 26 14:34:12 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 26 Jan 2011 22:34:12 -0000 Subject: [MacRuby] #1128: MacRuby builds broken gems, probably since 1.4.2 update Message-ID: <053.e3d071f71d0704590aa68de6a4cf7d88@macosforge.org> #1128: MacRuby builds broken gems, probably since 1.4.2 update ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- I tried to `gem install` a gem today that I had built using `gem build` from the MacRuby gem command, but I get the following error: ERROR: While executing gem ... (Errno::ENOENT) No such file or directory - open() failed zsh: exit 1 If I try to run `gem install` using the gem command that comes with Ruby 1.9.2, then I get a different error: ERROR: While executing gem ... (ArgumentError) string contains null byte zsh: exit 1 BUT, when I run `gem build` using the Ruby 1.9.2 gem command then everything installs fine on both ruby implementations. I know that I was able to build gems using the MacRuby gem command in the past, so I am guessing that it broke during the 1.4.2 upgrade. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 26 14:45:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 26 Jan 2011 22:45:57 -0000 Subject: [MacRuby] #1129: Setting value of dereferenced pointer properties fails silently Message-ID: <050.285c2d6753aa450e7b552954ad9504f2@macosforge.org> #1129: Setting value of dereferenced pointer properties fails silently ---------------------------------+------------------------------------------ Reporter: dev@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Orignal ML thread: http://lists.macosforge.org/pipermail/macruby- devel/2011-January/006944.html I suggest we either make it work or raise. For: {{{ - (BOOL)isPartialStringValid:(NSString **)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr originalString:(NSString *)origString originalSelectedRange:(NSRange)origSelRange errorDescription:(NSString **)error }}} When subclassing NSFormatter in ruby, I define the method as: {{{ def isPartialStringValid(partialStringPtr, proposedSelectedRange:proposedSelRangePtr, originalString:origString, originalSelectedRange:origSelRange, errorDescription:error) }}} When implementing the Cocoa Programming exercises in MacRuby, I ran across the following situation: At some point in that method definition, in the original code, Aaron sets the range properties directly: {{{ proposedSelRangePtr->location = [*partialStringPtr length]; proposedSelRangePtr->length = [match length] - proposedSelRangePtr->location; }}} Initially, I did similar in MacRuby {{{ proposedSelRangePtr[0].location = partialStringPtr[0].length proposedSelRangePtr[0].length = match.length - proposedSelRangePtr[0].location }}} This has no effect. It does not raise, but the values go unchanged. I can NSLog the range values before and after and they're the same. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 26 15:16:24 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Wed, 26 Jan 2011 23:16:24 -0000 Subject: [MacRuby] #1130: Patio Heater -Disadvantage of Electric heater Message-ID: <055.19f0251bcef3ef7d809ebbca29d3dc63@macosforge.org> #1130: Patio Heater -Disadvantage of Electric heater --------------------------------------+------------------------------------- Reporter: jyn.liloonline@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------------+------------------------------------- [[Image(http://www.backyardcity.com/Images/WTL/Patio- heater-02268-lg.jpg)]] Electric '''[http://patioheaterz.com/ patio heater]''' can warm up the patio in no time at all. A disadvantage, however, is that they cast a constant red glow that makes you feel as if you're getting baked. Natural gas heaters need to be connected to gas line but has lesser intensity than of the electric heater. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Wed Jan 26 18:41:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 27 Jan 2011 02:41:48 -0000 Subject: [MacRuby] #1131: Abort: exception is not caught when open the file which is not existing in at_exit block. Message-ID: <051.4e30060be29b1ebc2121516515ea48e3@macosforge.org> #1131: Abort: exception is not caught when open the file which is not existing in at_exit block. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby at_exit do f = File.open("not_exist.txt") end }}} Result: {{{ $ macruby test.rb uncaught Objective-C/C++ exception... 2011-01-27 11:37:08.433 macruby[2094:903] *** Terminating app due to uncaught exception 'Errno::ENOENT', reason: '/Users/watson/tmp/test.rb:2:in `block': No such file or directory - open() failed (Errno::ENOENT) ' *** Call stack at first throw: ( 0 CoreFoundation 0x00007fff8656f7b4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x00007fff81d330f3 objc_exception_throw + 45 2 libmacruby.dylib 0x0000000100161f05 rb_vm_raise + 437 3 libmacruby.dylib 0x00000001000408d9 rb_exc_raise + 9 4 libmacruby.dylib 0x000000010003e421 rb_sys_fail + 161 5 libmacruby.dylib 0x000000010005a753 rb_f_open + 1971 6 libmacruby.dylib 0x000000010014c06c rb_vm_dispatch + 7676 7 libmacruby.dylib 0x000000010006fdca rb_class_new_instance + 538 8 libmacruby.dylib 0x0000000100057178 rb_io_binmode + 1224 9 libmacruby.dylib 0x000000010014c06c rb_vm_dispatch + 7676 10 ??? 0x0000000102d5a436 0x0 + 4342522934 11 ??? 0x0000000102d5a84e 0x0 + 4342523982 12 libmacruby.dylib 0x000000010014d6f9 rb_vm_block_eval + 1401 13 libmacruby.dylib 0x000000010016020a rb_rescue2 + 58 14 libmacruby.dylib 0x00000001000411d0 ruby_finalize + 96 15 libmacruby.dylib 0x00000001000a2d20 rb_exit + 16 16 macruby 0x0000000100000d2f main + 159 17 macruby 0x0000000100000c88 start + 52 ) terminate called after throwing an instance of 'NSException' zsh: abort macruby test.rb }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 15:15:27 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 27 Jan 2011 23:15:27 -0000 Subject: [MacRuby] #1128: MacRuby builds broken gems, probably since 1.4.2 update In-Reply-To: <053.e3d071f71d0704590aa68de6a4cf7d88@macosforge.org> References: <053.e3d071f71d0704590aa68de6a4cf7d88@macosforge.org> Message-ID: <062.4df40e5a688d96f6874a32d22a4164a0@macosforge.org> #1128: MacRuby builds broken gems, probably since 1.4.2 update ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.9-blocker ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * keywords: => 0.9-blocker * milestone: => MacRuby 1.0 Comment: Looks like a regression. Let's try to fix this in 0.9, adding 0.9-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 15:17:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Thu, 27 Jan 2011 23:17:01 -0000 Subject: [MacRuby] #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) In-Reply-To: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> References: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> Message-ID: <060.6982d3e5d4a85e92beab1c7b51a76339@macosforge.org> #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.9-blocker ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * keywords: => 0.9-blocker * milestone: => MacRuby 1.0 Comment: Adding 0.9-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 18:17:17 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 02:17:17 -0000 Subject: [MacRuby] #1131: Abort: exception is not caught when open the file which is not existing in at_exit block. In-Reply-To: <051.4e30060be29b1ebc2121516515ea48e3@macosforge.org> References: <051.4e30060be29b1ebc2121516515ea48e3@macosforge.org> Message-ID: <060.f7098cc9b991000693d563615fdbb516@macosforge.org> #1131: Abort: exception is not caught when open the file which is not existing in at_exit block. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Should be fixed in r5192. {{{ $ ./miniruby -e "at_exit {p 1}; at_exit {foo}; at_exit{p 2}" 2 -e:1:in `block': undefined local variable or method `foo' for main:TopLevel (NameError) 1 $ ruby -e "at_exit {p 1}; at_exit {foo}; at_exit{p 2}" 2 -e:1: undefined local variable or method `foo' for main:Object (NameError) 1 }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 18:26:07 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 02:26:07 -0000 Subject: [MacRuby] #1132: Reopening a class modifies it Message-ID: <059.b0bc679f24de1eaf4c67c4d7eb3c978c@macosforge.org> #1132: Reopening a class modifies it ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- I have tried to create an example that doesn't rely on an external Gem, but so far this is the best test case I have to reproduce this---- Install BinData gem (used v1.3.1): {{{ macgem install bindata }}} Run the following w/ MacRuby r5191: {{{ require 'rubygems' require 'bindata' class MyRecord < BinData::Record uint16be :a_field end }}} No output-- good. Now run this modified code, that simply reopens the BinData::Base class but does not intentionally modify it: {{{ require 'rubygems' require 'bindata' class BinData::Base end class MyRecord < BinData::Record uint16be :a_field end }}} /Users/justin/.rvm/gems/ruby-1.9.1-p378/gems/bindata-1.3.1/lib/bindata/dsl.rb:158:in `dsl_raise:': unknown type 'uint16be' in MyRecord (TypeError) This is a regression--- running this same code in MacRuby 0.8 produces no exceptions, nor does running it under CRuby 1.9.2. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 18:28:45 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 02:28:45 -0000 Subject: [MacRuby] #1076: Abort occurs when raise a SecurityError within Thread. In-Reply-To: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> References: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> Message-ID: <060.f33b44cc1d327c144491fa6458cfe055@macosforge.org> #1076: Abort occurs when raise a SecurityError within Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): I tried running the snippet in gdb, and I see that there is a beginning of infinite loop going on here. {{{ (gdb) bt #0 rb_exc_raise (mesg=17184733856) at eval.c:322 #1 0x000000010002b0f4 in rb_raise (exc=, fmt=) at error.c:1145 #2 0x00000001000011d6 in rary_modify (ary=17184733248) at array.h:52 #3 0x0000000100007def in rary_push [inlined] () at /Users/lrz/src /macruby-trunk/array.h:451 #4 0x0000000100007def in rary_push_m (ary=17184733248, sel=, item=17184733184) at array.c:452 #5 0x0000000100143d79 in rb_vm_backtrace (skip=0) at vm.cpp:3695 #6 0x000000010014dbdc in rb_vm_raise (exception=17184732480) at vm.cpp:3477 #7 0x000000010002d309 in rb_exc_raise (mesg=) at eval.c:322 #8 0x000000010002b0f4 in rb_raise (exc=, fmt=) at error.c:1145 #9 0x00000001000011d6 in rary_modify (ary=17184732032) at array.h:52 #10 0x0000000100007def in rary_push [inlined] () at /Users/lrz/src /macruby-trunk/array.h:451 #11 0x0000000100007def in rary_push_m (ary=17184732032, sel=, item=17184731968) at array.c:452 #12 0x0000000100143d79 in rb_vm_backtrace (skip=0) at vm.cpp:3695 #13 0x000000010014dbdc in rb_vm_raise (exception=17184732640) at vm.cpp:3477 #14 0x000000010002d309 in rb_exc_raise (mesg=) at eval.c:322 #15 0x000000010002b0f4 in rb_raise (exc=, fmt=) at error.c:1145 #16 0x00000001000011d6 in rary_modify (ary=17184731296) at array.h:52 #17 0x00000001000094d2 in rary_shift (ary=17184731296, sel=, argc=0, argv=0x0) at array.c:534 #18 0x000000010013875c in rb_vm_dispatch (_vm=0x100bacea0, cache=0x100fda2c0, top=17184153504, self=17184731296, klass=0x40030e340, sel=0x10288b480, block=0x0, opt=0 '\0', argc=0, argv=0x0) at dispatcher.cpp:448 #19 0x0000000102b0663c in ?? () #20 0x0000000102b06cdb in ?? () #21 0x000000010013a169 in rb_vm_block_eval (b=0x100bacea0, argc=, argv=0x0) at dispatcher.cpp:98 #22 0x000000010014fe60 in rb_vm_thread_run (thread=17184731232) at vm.cpp:4552 #23 0x00007fff894c5864 in _pthread_start () #24 0x00007fff894c8575 in thread_start () }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 18:36:45 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 02:36:45 -0000 Subject: [MacRuby] #1076: Abort occurs when raise a SecurityError within Thread. In-Reply-To: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> References: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> Message-ID: <060.3dac71adec8dc6c4ac81f1905c0ea9d2@macosforge.org> #1076: Abort occurs when raise a SecurityError within Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): First, there is a bug in Array#delete. We check if the array can be modified *after* deleting the item, while it should be done first. {{{ $ ./miniruby -e "a=[1]; a.freeze; a.delete(1) rescue nil; p a" [] $ ruby -e "a=[1]; a.freeze; a.delete(1) rescue nil; p a" [1] }}} This bug is fixed in r5193. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 18:54:29 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 02:54:29 -0000 Subject: [MacRuby] #1076: Abort occurs when raise a SecurityError within Thread. In-Reply-To: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> References: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> Message-ID: <060.405a2c26d59e126243149cca791b3566@macosforge.org> #1076: Abort occurs when raise a SecurityError within Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@?): I modified the Array#delete for CRuby1.9 compatibility with r5099. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 18:59:50 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 02:59:50 -0000 Subject: [MacRuby] #1131: Abort: exception is not caught when open the file which is not existing in at_exit block. In-Reply-To: <051.4e30060be29b1ebc2121516515ea48e3@macosforge.org> References: <051.4e30060be29b1ebc2121516515ea48e3@macosforge.org> Message-ID: <060.e3de435a853e02f2438143d4013dbd9b@macosforge.org> #1131: Abort: exception is not caught when open the file which is not existing in at_exit block. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): The original bug should be fixed in r5195. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 19:02:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 03:02:57 -0000 Subject: [MacRuby] #1076: Abort occurs when raise a SecurityError within Thread. In-Reply-To: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> References: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> Message-ID: <060.6f5356dfb1e3aca31285ce4a26a1622d@macosforge.org> #1076: Abort occurs when raise a SecurityError within Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: I see, thanks for the explanation. I think we should fix the problem differently. This original bug should been fixed in r5195. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 19:06:21 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 03:06:21 -0000 Subject: [MacRuby] #1076: Abort occurs when raise a SecurityError within Thread. In-Reply-To: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> References: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> Message-ID: <060.69782c8cb2acb6c1c31d985aa381adc7@macosforge.org> #1076: Abort occurs when raise a SecurityError within Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): I am looking for a better way to fix r5099 but it's tricky :) -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 19:19:46 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 03:19:46 -0000 Subject: [MacRuby] #1076: Abort occurs when raise a SecurityError within Thread. In-Reply-To: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> References: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> Message-ID: <060.51b30fa4e3e5dc79b06a6935272884f6@macosforge.org> #1076: Abort occurs when raise a SecurityError within Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): This patch should re-implement r5099, however I'm having a ruby spec failure (apparently in rational), so I will commit the patch once I'm sure it does not break anything. {{{ Index: array.c =================================================================== --- array.c (revision 5193) +++ array.c (working copy) @@ -1805,9 +1805,15 @@ VALUE *t = p; VALUE *end = p + RARY(ary)->len; + bool check_modify = true; + if (use_equal) { while (t < end) { if (RTEST(rb_equal_fast(*t, item))) { + if (check_modify) { + rary_modify(ary); + check_modify = false; + } t++; } else { @@ -1820,6 +1826,10 @@ else { while (t < end) { if (*t == item) { + if (check_modify) { + rary_modify(ary); + check_modify = false; + } t++; } else { @@ -1842,7 +1852,6 @@ VALUE rary_delete(VALUE ary, SEL sel, VALUE item) { - rary_modify(ary); const bool changed = rary_delete_element(ary, item, true); if (!changed) { if (rb_block_given_p()) { @@ -2835,7 +2844,6 @@ static VALUE rary_compact_bang(VALUE ary, SEL sel) { - rary_modify(ary); return rary_delete_element(ary, Qnil, false) ? ary : Qnil; } }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 19:29:33 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 03:29:33 -0000 Subject: [MacRuby] #1076: Abort occurs when raise a SecurityError within Thread. In-Reply-To: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> References: <051.0930654c65bec5cbaa0fba5299a4a41b@macosforge.org> Message-ID: <060.c2b0621f48b25a3bb13ff91074aa085b@macosforge.org> #1076: Abort occurs when raise a SecurityError within Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): Okay I committed a slightly different version of that patch in r5196. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 19:31:30 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 03:31:30 -0000 Subject: [MacRuby] #1132: Reopening a class modifies it In-Reply-To: <059.b0bc679f24de1eaf4c67c4d7eb3c978c@macosforge.org> References: <059.b0bc679f24de1eaf4c67c4d7eb3c978c@macosforge.org> Message-ID: <068.51be1d00c95e10947d3aa96d67dbfa88@macosforge.org> #1132: Reopening a class modifies it ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.9-blocker ------------------------------------------+--------------------------------- Changes (by lsansonetti@?): * keywords: => 0.9-blocker * milestone: MacRuby 0.9 => MacRuby 1.0 Comment: This should be fixed in 0.9. Adding 0.9-blocker keyword. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 19:43:35 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 03:43:35 -0000 Subject: [MacRuby] #361: Embed MacRuby Target Adds 60+ MB to .app In-Reply-To: <050.572b3571708c100e8e310b9c06e29519@macosforge.org> References: <050.572b3571708c100e8e310b9c06e29519@macosforge.org> Message-ID: <059.cbf1ead36497ee4e509f4a0f3bef5a43@macosforge.org> #361: Embed MacRuby Target Adds 60+ MB to .app ---------------------------------+------------------------------------------ Reporter: dylan@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------+------------------------------------------ Comment(by lsansonetti@?): There weren't any effort but we can look? feel free to open a new ticket. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 19:51:30 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 03:51:30 -0000 Subject: [MacRuby] #1125: case insensitive fs require bug In-Reply-To: <054.c5f753e3567c0e951c0e51b757ab6c24@macosforge.org> References: <054.c5f753e3567c0e951c0e51b757ab6c24@macosforge.org> Message-ID: <063.a154592230c7b1c46811f93514df8052@macosforge.org> #1125: case insensitive fs require bug -------------------------------------+-------------------------------------- Reporter: mattaimonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by lsansonetti@?): So, CRuby does not seem to have support for case insensitive file systems. {{{ $ cat t.rb p 42 $ ruby1.9 -r ./t.rb -r ./t.rb -e '' 42 $ ruby1.9 -r ./T.rb -r ./t.rb -e '' 42 42 }}} In our case, I guess an easy fix is just not to crash and raise an exception instead. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 19:56:03 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 03:56:03 -0000 Subject: [MacRuby] #1133: Silly syntax error crashes macirb Message-ID: <053.1302d0f44432b22304cc5557a5dc2c6b@macosforge.org> #1133: Silly syntax error crashes macirb ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- I've reduced the problem to entering a single closing bracket ']'. I do not have this problem with the irb that ships with Ruby 1.9.2. ? macirb irb(main):001:0> ] /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/bin/macirb:55:in `block': negative argument (ArgumentError) from /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/bin/macirb:9:in `block' from /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/bin/macirb:7:in `
' [1] 81151 exit 1 irb -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 19:56:07 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 03:56:07 -0000 Subject: [MacRuby] #1125: case insensitive fs require bug In-Reply-To: <054.c5f753e3567c0e951c0e51b757ab6c24@macosforge.org> References: <054.c5f753e3567c0e951c0e51b757ab6c24@macosforge.org> Message-ID: <063.44215fca75eb6a3c2adffe0cc727558d@macosforge.org> #1125: case insensitive fs require bug -------------------------------------+-------------------------------------- Reporter: mattaimonetti@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | -------------------------------------+-------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed Comment: Fixed in r5197. {{{ $ DYLD_LIBRARY_PATH=. ./macruby -e "require 'URI'; require 'net/http'" -e:1:in `
': Can't load /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/1.9.2/uri.rbo: entry point function not located (this can happen when you load twice the same .rbo file with a different case on a case-insensitive filesystem) (LoadError) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 19:57:23 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 03:57:23 -0000 Subject: [MacRuby] #1133: Silly syntax error crashes macirb In-Reply-To: <053.1302d0f44432b22304cc5557a5dc2c6b@macosforge.org> References: <053.1302d0f44432b22304cc5557a5dc2c6b@macosforge.org> Message-ID: <062.2017149ed0848774697ecd46f73a1802@macosforge.org> #1133: Silly syntax error crashes macirb ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: eloy.de.enige@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Changes (by lsansonetti@?): * owner: lsansonetti@? => eloy.de.enige@? Comment: Seems to be a macirb bug. Sending to Eloy for investigation. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 20:08:01 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 04:08:01 -0000 Subject: [MacRuby] #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) In-Reply-To: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> References: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> Message-ID: <060.cdd28f4b4c5e57227eb33d58875a2327@macosforge.org> #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: 0.9-blocker ----------------------------------+----------------------------------------- Comment(by lsansonetti@?): We need to make sure #1116 is still fixed after fixing this ticket (in other words, making sure it's still as fast as before, if not faster). -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 20:19:36 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 04:19:36 -0000 Subject: [MacRuby] #1126: iokit support In-Reply-To: <047.1159e00e7fa47e27451f3a27c0260efe@macosforge.org> References: <047.1159e00e7fa47e27451f3a27c0260efe@macosforge.org> Message-ID: <056.504fb9e3ed5c038e3c523d1aa1980258@macosforge.org> #1126: iokit support ------------------------------+--------------------------------------------- Reporter: joelr1@? | Owner: lsansonetti@? Type: enhancement | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ------------------------------+--------------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.9 => MacRuby 1.0 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 20:50:47 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 04:50:47 -0000 Subject: [MacRuby] #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) In-Reply-To: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> References: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> Message-ID: <060.9643c4ce2cc3afa2643e8614458a7453@macosforge.org> #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: fixed Keywords: 0.9-blocker | ----------------------------------+----------------------------------------- Changes (by vincent.isambart@?): * status: new => closed * resolution: => fixed Comment: Should be fixed in r5200 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 20:53:57 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 04:53:57 -0000 Subject: [MacRuby] #1123: does not process the "ensure" when called the "next". In-Reply-To: <051.5e00d7652fdf4d789ce549eb20409c88@macosforge.org> References: <051.5e00d7652fdf4d789ce549eb20409c88@macosforge.org> Message-ID: <060.46e3726ecfabfdbeee69abcba6605992@macosforge.org> #1123: does not process the "ensure" when called the "next". ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Should be fixed in r5201. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 21:14:16 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 05:14:16 -0000 Subject: [MacRuby] #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) In-Reply-To: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> References: <051.ec649bc6eef18ede3f3df296aed4f41a@macosforge.org> Message-ID: <060.2bbf8fc358433f925ac439199e75f7fc@macosforge.org> #1121: Assertion failed: (boundaries.start_offset_in_bytes <= offset_in_bytes) ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: 0.9-blocker | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 1.0 => MacRuby 0.9 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 21:42:15 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 05:42:15 -0000 Subject: [MacRuby] #1084: Abort occurs when was passed Object of Method to define_method. In-Reply-To: <051.cbb147d112a0181ca08118c70f0bcdcc@macosforge.org> References: <051.cbb147d112a0181ca08118c70f0bcdcc@macosforge.org> Message-ID: <060.730832f0f3d206fe4a2fb451f382ec01@macosforge.org> #1084: Abort occurs when was passed Object of Method to define_method. ----------------------------------+----------------------------------------- Reporter: watson1978@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: I added a trivial implementation in r5202. It seems to work. However, it's likely a bit different than CRuby (I see that CRuby does some extra checking). I guess we should enable the ruby specs for that method and follow the implementation on separate tickets. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 23:29:37 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 07:29:37 -0000 Subject: [MacRuby] #668: Newlines and carriage returns cause erroneous matches in StringScanner In-Reply-To: <050.e849ae30f4082c72c7b29e327a80f92e@macosforge.org> References: <050.e849ae30f4082c72c7b29e327a80f92e@macosforge.org> Message-ID: <059.1c321130440cc93abcf6f1c9dd5002a1@macosforge.org> #668: Newlines and carriage returns cause erroneous matches in StringScanner ---------------------------------+------------------------------------------ Reporter: mred@? | Owner: mattaimonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------+------------------------------------------ Changes (by mattaimonetti@?): * status: new => closed * resolution: => fixed Comment: fixed in r5204 Used \A instead of ^. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Thu Jan 27 23:31:25 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 07:31:25 -0000 Subject: [MacRuby] #668: Newlines and carriage returns cause erroneous matches in StringScanner In-Reply-To: <050.e849ae30f4082c72c7b29e327a80f92e@macosforge.org> References: <050.e849ae30f4082c72c7b29e327a80f92e@macosforge.org> Message-ID: <059.3c50d0443be83d1df4501bf8cae89b53@macosforge.org> #668: Newlines and carriage returns cause erroneous matches in StringScanner ---------------------------------+------------------------------------------ Reporter: mred@? | Owner: mattaimonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------+------------------------------------------ Changes (by mattaimonetti@?): * milestone: MacRuby 1.0 => MacRuby 0.9 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 00:15:16 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 08:15:16 -0000 Subject: [MacRuby] #876: EXC_BAD_ACCESS using IOBluetooth In-Reply-To: <060.7cec27f83f2ffa61cc9be1d77ec17eb0@macosforge.org> References: <060.7cec27f83f2ffa61cc9be1d77ec17eb0@macosforge.org> Message-ID: <069.f3c1151e8191ab5585ec96453630f604@macosforge.org> #876: EXC_BAD_ACCESS using IOBluetooth -------------------------------------------+-------------------------------- Reporter: matt.wizeman@? | Owner: mattaimonetti@? Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: invalid Keywords: | -------------------------------------------+-------------------------------- Changes (by mattaimonetti@?): * status: new => closed * resolution: => invalid * milestone: MacRuby 1.0 => MacRuby 0.9 Comment: confirmed, here is the backtrace: {{{ #0 0x00007fff8390b700 in _class_getSuperclass () #1 0x00000001000f3b26 in rb_objc_convert_immediate () #2 0x0000000100f219f7 in ?? () #3 0x00007fff885d7d7a in -[IOBluetoothL2CAPChannel processIncomingData:] () #4 0x00007fff885d670b in -[IOBluetoothL2CAPChannel handleMachMessage:] () #5 0x00007fff822a8f47 in __NSFireMachPort () #6 0x00007fff8567268e in __CFMachPortPerform () #7 0x00007fff8564a6e1 in __CFRunLoopRun () #8 0x00007fff85648dbf in CFRunLoopRunSpecific () #9 0x00007fff81f8a93a in RunCurrentEventLoopInMode () #10 0x00007fff81f8a73f in ReceiveNextEventCommon () #11 0x00007fff81f8a5f8 in BlockUntilNextEventMatchingListInMode () #12 0x00007fff827e7e64 in _DPSNextEvent () #13 0x00007fff827e77a9 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] () #14 0x00007fff827ad48b in -[NSApplication run] () #15 0x00007fff827a61a8 in NSApplicationMain () #16 0x0000000100f1dbcd in ?? () #17 0x000000010014a7e8 in rb_vm_dispatch () #18 0x0000000100f1c12c in ?? () #19 0x0000000100f1b913 in ?? () #20 0x0000000100163523 in rb_vm_run () #21 0x0000000100040f80 in ruby_run_node () #22 0x000000010015a872 in macruby_main () #23 0x0000000100000efe in main (argc=1, argv=0x7fff5fbff7d0) at /Users/mattetti/tmp/wiimote-test/main.m:13 }}} After further investigation, this is a bug in the sample code: {{{ def openL2CAPChannelWithPSM(psm, delegate:delegate) channel = Pointer.new_with_type("@") if (@wiiDevice.openL2CAPChannelSync(channel, withPSM:psm, delegate:delegate) != KIOReturnSuccess) closeConnection return nil end channel[0] end }}} The channel local variable gets GC'd, to avoid that, use an instance variable to keep the pointer from being GC'd. {{{ def openL2CAPChannelWithPSM(psm, delegate:delegate) @channel = Pointer.new_with_type("@") if (@wiiDevice.openL2CAPChannelSync(channel, withPSM:psm, delegate:delegate) != KIOReturnSuccess) closeConnection return nil end channel[0] end }}} I tested that here and everything is working fine. I think the confusion might be related to the fact that you might not have expected the pointer to be garbage collected. Feel free to reopen this ticket if my solution doesn't work for you. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 00:43:48 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 08:43:48 -0000 Subject: [MacRuby] #876: EXC_BAD_ACCESS using IOBluetooth In-Reply-To: <060.7cec27f83f2ffa61cc9be1d77ec17eb0@macosforge.org> References: <060.7cec27f83f2ffa61cc9be1d77ec17eb0@macosforge.org> Message-ID: <069.80d883d32ec5d3014a0fa5a496199e42@macosforge.org> #876: EXC_BAD_ACCESS using IOBluetooth -------------------------------------------+-------------------------------- Reporter: matt.wizeman@? | Owner: mattaimonetti@? Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: invalid Keywords: | -------------------------------------------+-------------------------------- Comment(by mattaimonetti@?): oops I realized there was a typo the pasted code: {{{ def openL2CAPChannelWithPSM(psm, delegate:delegate) @channel = Pointer.new_with_type("@") if (@wiiDevice.openL2CAPChannelSync(@channel, withPSM:psm, delegate:delegate) != KIOReturnSuccess) closeConnection return nil end channel[0] end }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 00:53:49 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 08:53:49 -0000 Subject: [MacRuby] #1114: Unable to use CATextLayer.font= which expects a CFTypeRef In-Reply-To: <054.9be0ca9377373ada2c1b6e9864974db6@macosforge.org> References: <054.9be0ca9377373ada2c1b6e9864974db6@macosforge.org> Message-ID: <063.586ba85020d95e289d79fbeaa5ac8b78@macosforge.org> #1114: Unable to use CATextLayer.font= which expects a CFTypeRef -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.9 => MacRuby 1.0 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 01:09:59 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 09:09:59 -0000 Subject: [MacRuby] #876: EXC_BAD_ACCESS using IOBluetooth In-Reply-To: <060.7cec27f83f2ffa61cc9be1d77ec17eb0@macosforge.org> References: <060.7cec27f83f2ffa61cc9be1d77ec17eb0@macosforge.org> Message-ID: <069.8ebe48d7f842876f4d8fd1e25047ed2c@macosforge.org> #876: EXC_BAD_ACCESS using IOBluetooth -------------------------------------------+-------------------------------- Reporter: matt.wizeman@? | Owner: mattaimonetti@? Type: defect | Status: reopened Priority: critical | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: | -------------------------------------------+-------------------------------- Changes (by mattaimonetti@?): * status: closed => reopened * resolution: invalid => * milestone: MacRuby 0.9 => MacRuby 1.0 Comment: forget about all that, I was tired and didn't really test things properly, if you use an ivar and return the dereferenced value of the pointer, the same problem will occur. Sorry for the spamming. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 03:33:58 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 11:33:58 -0000 Subject: [MacRuby] #1134: The new code for next/ensure does not work properly Message-ID: <057.066ac811d8f3b2e8c65c7bc3b232d4dc@macosforge.org> #1134: The new code for next/ensure does not work properly ----------------------------------------+----------------------------------- Reporter: vincent.isambart@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- If you rebuild the current trunk after a rake clean, MacRuby loops forever on Makefile generation for the extensions. Running it in GDB you can see that it's looping in the LLVM optimization passes. I managed to reduce the problem to the following: {{{ def foo(dummy) 1.times do next end ensure puts end foo(nil) }}} In fact running this reduction in MacRuby does not loop but simply crashes. The bug comes probably from today's next/ensure changes. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 10:11:54 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 18:11:54 -0000 Subject: [MacRuby] #1135: regular expression subroutines not supported Message-ID: <054.7ebbc0ddeed263011e7ffd89f767bf86@macosforge.org> #1135: regular expression subroutines not supported -------------------------------------+-------------------------------------- Reporter: mattaimonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- The following example which works in CRuby 1.9.2 doesn't compile in MacRuby: {{{ sentence = %r{ (? cat | dog | gerbil ){0} (? eats | drinks| generates ){0} (? water | bones | PDFs ){0} (? big | small | smelly ){0} (? (\g\s)? ){0} The\s\g\g\s\g\s\g\g }x md = sentence.match("The cat drinks water") puts "The subject is #{md[:subject]} and the verb is #{md[:verb]}" md = sentence.match("The big dog eats smelly bones") puts "The adjective in the second sentence is #{md[:adjective]}" sentence =~ "The gerbil generates big PDFs" puts "And the object in the last is #{$~[:object]}" }}} {{{ compilation error: U_REGEX_RULE_SYNTAX }}} More explanation about the subroutines there: http://pragdave.blogs.pragprog.com/pragdave/2008/10/fun-with-ruby-19 -regular-expressions.html -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 11:09:42 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 19:09:42 -0000 Subject: [MacRuby] #1136: Array#pack performance w/ base64 strings Message-ID: <059.25b79c5206de509cad0542aea373a9b6@macosforge.org> #1136: Array#pack performance w/ base64 strings ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- It takes MacRuby over 13,000x longer to convert a 1MB string to Base64 than it does CRuby. Using MacRuby r5204 and CRuby 1.9.2. test.rb: {{{ require 'benchmark' str = "0" * 1024 * 1024 # 1MB string data ret = Benchmark.measure do [str].pack("m") end puts ret }}} benchmarks: {{{ ~ > ruby ./test.rb 0.000000 0.010000 0.010000 ( 0.006028) ~ > macruby ./test.rb 81.530000 25.220000 106.750000 ( 81.303252) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 12:24:00 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 20:24:00 -0000 Subject: [MacRuby] #1133: Silly syntax error crashes macirb In-Reply-To: <053.1302d0f44432b22304cc5557a5dc2c6b@macosforge.org> References: <053.1302d0f44432b22304cc5557a5dc2c6b@macosforge.org> Message-ID: <062.b7bfe4f3e853f7a65eabd65e39ad25de@macosforge.org> #1133: Silly syntax error crashes macirb ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: eloy.de.enige@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Changes (by eloy.de.enige@?): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Thanks for the report. Fixed in r5206. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 13:43:44 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 21:43:44 -0000 Subject: [MacRuby] #1134: The new code for next/ensure does not work properly In-Reply-To: <057.066ac811d8f3b2e8c65c7bc3b232d4dc@macosforge.org> References: <057.066ac811d8f3b2e8c65c7bc3b232d4dc@macosforge.org> Message-ID: <066.20c07554164c5c78932062df2100ec88@macosforge.org> #1134: The new code for next/ensure does not work properly ----------------------------------------+----------------------------------- Reporter: vincent.isambart@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------------+----------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed Comment: Fixed in r5207. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 14:27:32 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 22:27:32 -0000 Subject: [MacRuby] #1137: macruby_deploy should automate gems embedding Message-ID: <052.17f681826fc755537a5684e1b6aff118@macosforge.org> #1137: macruby_deploy should automate gems embedding -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: 0.9-blocker -----------------------------------+---------------------------------------- A lot of people are asking how to embed gems inside MacRuby Xcode projects. macruby_deploy should accept a list of gems and properly unpack them as well as their dependencies inside the application bundle. Example: {{{ $ macruby_deploy --gem nokogiri --gem rack MyApp.app }}} Therefore, it would just be a matter of hacking the Xcode rule and add the proper --gem arguments to the macruby_deploy invocation. This should be documented on the website. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 14:34:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 22:34:34 -0000 Subject: [MacRuby] #1136: Array#pack performance w/ base64 strings In-Reply-To: <059.25b79c5206de509cad0542aea373a9b6@macosforge.org> References: <059.25b79c5206de509cad0542aea373a9b6@macosforge.org> Message-ID: <068.4c1cdbed47480549d3941aaf252875bb@macosforge.org> #1136: Array#pack performance w/ base64 strings ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.9 => MacRuby 1.0 Comment: Looking in shark, looks like we spend most of our time reallocating the buffer. It should be easy to improve. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 15:19:30 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Fri, 28 Jan 2011 23:19:30 -0000 Subject: [MacRuby] #1136: Array#pack performance w/ base64 strings In-Reply-To: <059.25b79c5206de509cad0542aea373a9b6@macosforge.org> References: <059.25b79c5206de509cad0542aea373a9b6@macosforge.org> Message-ID: <068.dfcb6f6d2a3a56b73299694499bee94c@macosforge.org> #1136: Array#pack performance w/ base64 strings ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------------+--------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby 1.0 => MacRuby 0.9 Comment: Should be fixed in r5208. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 19:17:25 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 29 Jan 2011 03:17:25 -0000 Subject: [MacRuby] #1138: Segfault when opening or Digesting a large file Message-ID: <053.2dd39372776bad23e66ff2db03e1f6ae@macosforge.org> #1138: Segfault when opening or Digesting a large file ------------------------------------+--------------------------------------- Reporter: steven.buxton@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- I am attempting to calculate SHA1 hashes of very large ( > 1GB ) files. This works fine in MRI 1.9.2 but segfaults in macruby 0.8 and 1/27 nightly. require 'digest/sha1' Digest::SHA1.file('some huge file').hexdigest The above code will segfault 100% of the time with files larger then 1GB. I can also produce the same segfault with the following: File.open('some huge file', 'rb') do |file| while blk = file.read(1024) #do stuff end end -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Fri Jan 28 21:34:21 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sat, 29 Jan 2011 05:34:21 -0000 Subject: [MacRuby] #1139: MacRuby inconsistent compared to CRuby when breaking from hash enumeration Message-ID: <053.03deaeffbcb45f1268be6a203b9c589a@macosforge.org> #1139: MacRuby inconsistent compared to CRuby when breaking from hash enumeration ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- When I iterate over a hash in CRuby and `break` during one iteration the iteration will return value to be nil. If I try the same thing in MacRuby I will get the same return value that I would have gotten had the iteration finished. I found this problem with Hash objects, an Array has the same behaviour in this case on CRuby and MacRuby. With the CRuby irb: ruby-1.9.2-p136 :001 > { test:'pair' }.each_pair { |key,value| break } => nil ruby-1.9.2-p136 :002 > { test:'pair' }.each_pair { |key,value| key } => {:test=>"pair"} ruby-1.9.2-p136 :003 > With the MacRuby irb: irb(main):001:0> { test:'pair' }.each_pair { |key,value| break } => {:test=>"pair"} irb(main):002:0> { test:'pair' }.each_pair { |key,value| key } => {:test=>"pair"} irb(main):003:0> -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 29 16:48:11 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 30 Jan 2011 00:48:11 -0000 Subject: [MacRuby] #1140: Using regex partitioning is a LOT slower than 1.8.7 or 1.9.2. Message-ID: <049.f08b7b651aaaf46a504e0f12f6d6711f@macosforge.org> #1140: Using regex partitioning is a LOT slower than 1.8.7 or 1.9.2. --------------------------------+------------------------------------------- Reporter: cyberfox@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: performance regex --------------------------------+------------------------------------------- Here's the timings for a relatively simple program. (Caveat: Yes, it's using regular expressions to parse HTML; it's a stop- gap until I can make Nokogiri work with MacRuby in an app bundle. The point, however, is that partitioning, or some other operation done by this code, is somehow a _lot_ slower in MacRuby.) The outputs are as follows: {{{ $ rvm system --verbose Now using system ruby. $ ruby --version ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] $ ruby parse_html.rb Just partitioning took: 0.0182089805603027 Number of partitioned splits: 2400 $ rvm 1.9.2 --verbose Using /Users/mrs/.rvm/gems/ruby-1.9.2-p136 $ ruby parse_html.rb Just partitioning took: 0.033324480056762695 Number of partitioned splits: 2400 $ macruby parse_html.rb Just partitioning took: 1.19672107696533 Number of partitioned splits: 2400 $ macruby --version MacRuby 0.8 (ruby 1.9.2) [universal-darwin10.0, x86_64] }}} Attached is a zip file with the HTML being parsed, and the tiny Ruby program that's doing it. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sat Jan 29 19:36:30 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 30 Jan 2011 03:36:30 -0000 Subject: [MacRuby] #1140: Using regex partitioning is a LOT slower than 1.8.7 or 1.9.2. In-Reply-To: <049.f08b7b651aaaf46a504e0f12f6d6711f@macosforge.org> References: <049.f08b7b651aaaf46a504e0f12f6d6711f@macosforge.org> Message-ID: <058.c12a89634c2790057174602c32e434cc@macosforge.org> #1140: Using regex partitioning is a LOT slower than 1.8.7 or 1.9.2. --------------------------------+------------------------------------------- Reporter: cyberfox@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: performance regex --------------------------------+------------------------------------------- Changes (by lsansonetti@?): * milestone: MacRuby 0.9 => MacRuby 1.0 Comment: Thanks for the report, we will investigate. Regarding your Nokogiri-in- app-bundle issue, you may be interested in following #1137. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 30 12:34:12 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 30 Jan 2011 20:34:12 -0000 Subject: [MacRuby] #1133: Silly syntax error crashes macirb In-Reply-To: <053.1302d0f44432b22304cc5557a5dc2c6b@macosforge.org> References: <053.1302d0f44432b22304cc5557a5dc2c6b@macosforge.org> Message-ID: <062.fc0512387038e16f1eaa4335fb1a71a6@macosforge.org> #1133: Silly syntax error crashes macirb ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: eloy.de.enige@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Comment(by mrada@?): Confirmed fixed, thanks Eloy. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 30 15:47:39 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Sun, 30 Jan 2011 23:47:39 -0000 Subject: [MacRuby] #1137: macruby_deploy should automate gems embedding In-Reply-To: <052.17f681826fc755537a5684e1b6aff118@macosforge.org> References: <052.17f681826fc755537a5684e1b6aff118@macosforge.org> Message-ID: <061.4cb19953a41cce39080dc1125fc90436@macosforge.org> #1137: macruby_deploy should automate gems embedding -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: 0.9-blocker -----------------------------------+---------------------------------------- Comment(by cyberfox@?): Nokogiri (the one I'd ''really'' like to use) has the potentially problematic requirement of including libxml and libxslt in the project as well, so I don't think it's going to be that simple; still, it ''would'' be really helpful as a starting point. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Sun Jan 30 22:16:31 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 31 Jan 2011 06:16:31 -0000 Subject: [MacRuby] #1141: NSArray.new.class should be "NSArray" Message-ID: <057.9a54532fb14dc93fba9ac0e5d806f01e@macosforge.org> #1141: NSArray.new.class should be "NSArray" ----------------------------------------+----------------------------------- Reporter: vincent.isambart@? | Owner: lsansonetti@? Type: defect | Status: new Priority: critical | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- Even though NSArray's behavior is different from Array, Array.new.class, NSArray.new.class and NSMutableArray.new.class all return "Array". The user should be able to easily differentiate between Ruby arrays and Cocoa arrays so NSArray instances should not pretend to be Array instances. We should also consider doing it for NSDictionary and NSString. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 31 00:06:42 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 31 Jan 2011 08:06:42 -0000 Subject: [MacRuby] #1137: macruby_deploy should automate gems embedding In-Reply-To: <052.17f681826fc755537a5684e1b6aff118@macosforge.org> References: <052.17f681826fc755537a5684e1b6aff118@macosforge.org> Message-ID: <061.c6482c1852494f93c152267f98474712@macosforge.org> #1137: macruby_deploy should automate gems embedding -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: 0.9-blocker -----------------------------------+---------------------------------------- Comment(by lsansonetti@?): Agreed, supporting gems requiring non-Ruby, 3rd-party libraries will be hard. However, in the case of Nokogiri, I believe that on Mac OS X it uses the version of libxml and libxslt that come with the OS, so just embedding the gem may just work. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 31 12:05:27 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 31 Jan 2011 20:05:27 -0000 Subject: [MacRuby] #1136: Array#pack performance w/ base64 strings In-Reply-To: <059.25b79c5206de509cad0542aea373a9b6@macosforge.org> References: <059.25b79c5206de509cad0542aea373a9b6@macosforge.org> Message-ID: <068.c41b8d223b9b060eaeebd73e07c83566@macosforge.org> #1136: Array#pack performance w/ base64 strings ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------------+--------------------------------- Comment(by justin@?): Awesome improvement! Nearly the same performance as CRuby now! {{{ ~ > ruby ./test.rb 0.000000 0.000000 0.000000 ( 0.006377) ~ > macruby ./test.rb 0.010000 0.010000 0.020000 ( 0.008478) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 31 14:08:12 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 31 Jan 2011 22:08:12 -0000 Subject: [MacRuby] #1142: Array#pack performance while converting array of ASCII values to string Message-ID: <059.01697ef81b7c6acd4ae5cde3130797a3@macosforge.org> #1142: Array#pack performance while converting array of ASCII values to string ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- It takes MacRuby over 1600x longer than CRuby 1.9.2 to convert an array of ASCII characters to a 1MB string using Array#pack. Simular to ticket 1136: https://www.macruby.org/trac/ticket/1136 Using MacRuby r5214 that includes the fix from ticket 1136. test.rb: {{{ require 'benchmark' ary = Array.new(1024*1024,0) ret = Benchmark.measure do ary.pack('C*') end puts ret }}} benchmarks: {{{ ~ > ruby ./test.rb 0.040000 0.000000 0.040000 ( 0.043437) ~ > macruby ./test.rb 87.690000 26.300000 113.990000 ( 69.515317) }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 31 15:01:31 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 31 Jan 2011 23:01:31 -0000 Subject: [MacRuby] #1142: Array#pack performance while converting array of ASCII values to string In-Reply-To: <059.01697ef81b7c6acd4ae5cde3130797a3@macosforge.org> References: <059.01697ef81b7c6acd4ae5cde3130797a3@macosforge.org> Message-ID: <068.13f24e3fd719bd119e28359934cdbb0d@macosforge.org> #1142: Array#pack performance while converting array of ASCII values to string ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: new Priority: major | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ------------------------------------------+--------------------------------- Changes (by lsansonetti@?): * milestone: => MacRuby 1.0 Comment: This needs to be fixed in 1.0. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 31 15:14:27 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 31 Jan 2011 23:14:27 -0000 Subject: [MacRuby] #1143: Dates in 32-bit converted from NSDate are not precise enough Message-ID: <057.7459083e2916d124c858585ca2d52ec7@macosforge.org> #1143: Dates in 32-bit converted from NSDate are not precise enough ----------------------------------------+----------------------------------- Reporter: vincent.isambart@? | Owner: vincent.isambart@? Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- {{{ % arch -i386 macruby -e 'p NSDate.date; sleep 2; p NSDate.date' 2011-02-01 08:04:32 +0900 2011-02-01 08:04:32 +0900 }}} The time displayed should of course change with a sleep of 2 seconds. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 31 15:22:29 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 31 Jan 2011 23:22:29 -0000 Subject: [MacRuby] #1143: Dates in 32-bit converted from NSDate are not precise enough In-Reply-To: <057.7459083e2916d124c858585ca2d52ec7@macosforge.org> References: <057.7459083e2916d124c858585ca2d52ec7@macosforge.org> Message-ID: <066.68c2b310f37fce024fd497b91f282266@macosforge.org> #1143: Dates in 32-bit converted from NSDate are not precise enough ----------------------------------------+----------------------------------- Reporter: vincent.isambart@? | Owner: vincent.isambart@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------------+----------------------------------- Changes (by vincent.isambart@?): * status: new => closed * resolution: => fixed Comment: fixed in r5215 -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 31 15:43:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Mon, 31 Jan 2011 23:43:34 -0000 Subject: [MacRuby] #1142: Array#pack performance while converting array of ASCII values to string In-Reply-To: <059.01697ef81b7c6acd4ae5cde3130797a3@macosforge.org> References: <059.01697ef81b7c6acd4ae5cde3130797a3@macosforge.org> Message-ID: <068.742d5ccc4589727532f484748e27ee55@macosforge.org> #1142: Array#pack performance while converting array of ASCII values to string ------------------------------------------+--------------------------------- Reporter: justin@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------------+--------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed * milestone: MacRuby 1.0 => MacRuby 0.9 Comment: It was the same problem as #1136. I fixed in r5216 all the cases of Array#pack to pre-allocate the result byte string, except 'w' (BER compressed integer). That one might be harder to fix, and I suspect it's not used a lot. -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 31 17:43:46 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 01 Feb 2011 01:43:46 -0000 Subject: [MacRuby] #1137: macruby_deploy should automate gems embedding In-Reply-To: <052.17f681826fc755537a5684e1b6aff118@macosforge.org> References: <052.17f681826fc755537a5684e1b6aff118@macosforge.org> Message-ID: <061.29858ccb699895c4fac2492bc0662a35@macosforge.org> #1137: macruby_deploy should automate gems embedding -----------------------------------+---------------------------------------- Reporter: lsansonetti@? | Owner: lsansonetti@? Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: 0.9-blocker | -----------------------------------+---------------------------------------- Changes (by lsansonetti@?): * status: new => closed * resolution: => fixed Comment: Done in r5217. --gem has been introduced to macruby_deploy. Make sure --embed is also passed, otherwise it won't do anything. {{{ $ macruby_deploy --embed --gem nokogiri Foo.app }}} -- Ticket URL: MacRuby From ruby-noreply at macosforge.org Mon Jan 31 18:50:34 2011 From: ruby-noreply at macosforge.org (MacRuby) Date: Tue, 01 Feb 2011 02:50:34 -0000 Subject: [MacRuby] #1144: Exception not caught when trying to mutate an NSMutableArray during iteration Message-ID: <053.73d786fa4023925cb2312d7af20e7b85@macosforge.org> #1144: Exception not caught when trying to mutate an NSMutableArray during iteration ------------------------------------+--------------------------------------- Reporter: mrada@? | Owner: lsansonetti@? Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- When I try to mutate an NSMutableArray while iterating over it, the Objective-C runtime will throw an exception which the MacRuby VM does not catch and propagate as a Ruby exception which causes MacRuby to segfault. The following example will cause MacRuby to segfault because of the problem mentioned above: numbers = NSMutableArray.alloc.init numbers.addObjectsFromArray [1, 2] numbers.each { |number| numbers << 10 unless number == 10 } See this thread for more details: http://lists.macosforge.org/pipermail /macruby-devel/2011-January/007034.html -- Ticket URL: MacRuby