Re: [MacRuby-devel] [MacRuby] #452: Segmentation Fault tracing back to openssl.bundle when authenticating with gcal4ruby

2009-11-25 Thread MacRuby
#452: Segmentation Fault tracing back to openssl.bundle when authenticating with
gcal4ruby
+---
 Reporter:  dwein...@…  |Owner:  lsansone...@…
 Type:  defect  |   Status:  closed   
 Priority:  major   |Milestone:  MacRuby 0.5  
Component:  MacRuby |   Resolution:  fixed
 Keywords:  |  
+---
Changes (by lsansone...@…):

  * status:  new => closed
  * resolution:  => fixed
  * milestone:  => MacRuby 0.5


Comment:

 The crash should be fixed by r3050. Your snippet now fails elsewhere:

 {{{
 $ DYLD_LIBRARY_PATH=. ./macruby -I./ext/openssl -r rubygems -e "require
 'gcal4ruby'; service=GCal4Ruby::Service.new;
 service.authenticate('@gmail.com','')"
 core:in `connect': undefined method `set_params' for
 # (NoMethodError)
 from core:in `do_start'
 from core:in `start'
 from
 /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/base.rb:111:in
 `send_post:'
 from
 
/Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/service.rb:43:in
 `authenticate:'
 }}}

 I believe it is because OpenSSL::SSL::SSLContext#set_params is defined as
 internal API and net/http hasn't been updated yet. This is anyway a
 different bug, so I'm closing this one.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #452: Segmentation Fault tracing back to openssl.bundle when authenticating with gcal4ruby

2009-11-25 Thread MacRuby
#452: Segmentation Fault tracing back to openssl.bundle when authenticating with
gcal4ruby
+---
 Reporter:  dwein...@…  |Owner:  lsansone...@…
 Type:  defect  |   Status:  closed   
 Priority:  major   |Milestone:  MacRuby 0.5  
Component:  MacRuby |   Resolution:  fixed
 Keywords:  |  
+---

Comment(by lsansone...@…):

 I actually have a different error now.

 {{{
 $ macruby -r rubygems -e "require 'gcal4ruby';
 service=GCal4Ruby::Service.new;
 service.authenticate('@gmail.com','')"
 core:in `sysclose': wrong argument type OpenSSL::SSL::SSLSocket (expected
 Data) (TypeError)
 from
 
/Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/site_ruby/1.9.0/openssl/buffering.rb:336:in
 `close'
 from core:in `close'
 from core:in `do_finish'
 from core:in `start'
 from
 /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/base.rb:111:in
 `send_post:'
 from
 
/Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/service.rb:43:in
 `authenticate:'
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #452: Segmentation Fault tracing back to openssl.bundle when authenticating with gcal4ruby

2009-11-25 Thread MacRuby
#452: Segmentation Fault tracing back to openssl.bundle when authenticating with
gcal4ruby
+---
 Reporter:  dwein...@…  |Owner:  lsansone...@…
 Type:  defect  |   Status:  closed   
 Priority:  major   |Milestone:  MacRuby 0.5  
Component:  MacRuby |   Resolution:  fixed
 Keywords:  |  
+---

Comment(by lsansone...@…):

 With r3051, this now fails as expected.

 {{{
 $ macruby -r rubygems -e "require 'gcal4ruby';
 service=GCal4Ruby::Service.new;
 service.authenticate('@gmail.com','')"
 core:in `raise:': Error=BadAuthentication
  (GCal4Ruby::HTTPPostFailed)
 from
 /Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/base.rb:113:in
 `send_post:'
 from
 
/Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/service.rb:43:in
 `authenticate:'
 }}}

 When I do pass my gmail account information, it fails differently:

 {{{
 
/Users/lrz/.gem/macruby/1.9.0/gems/gcal4ruby-0.2.5/lib/gcal4ruby/service.rb:42:in
 `authenticate:': undefined method `to_a' for
 # (NoMethodError)
 }}}

 Looking at line 43 of gcal4ruby/service.rb:

 {{{
   @auth_token = ret.read_body.to_a[2].gsub("Auth=", "").strip
 }}}

 #read_body (defined in net/http) is supposed to return a String, I
 believe. String#to_a is not defined anymore in 1.9. I believe this is a
 1.8 vs 1.9 issue (but I'm not sure). Let me know if you find anything.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #457: (svn 3050) MacGem crashed with "Symbol not found: _rb_yield"

2009-11-25 Thread MacRuby
#457: (svn 3050) MacGem crashed with "Symbol not found: _rb_yield"
-+--
 Reporter:  valerii.hi...@…  |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  trivial  |   Milestone:  MacRuby 0.5  
Component:  MacRuby  |Keywords:   
-+--
 Info: MacRuby 0.5 svn 3050

 Here is the crash log:
 macgem list
 2009-11-25 12:57:27.237 macruby[16030:903] *** Terminating app due to
 uncaught exception 'LoadError', reason:
 
'dlopen(/Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/site_ruby/1.9.0
 /universal-darwin10.0/zlib.bundle, 9): Symbol not found: _rb_yield
   Referenced from:
 /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/site_ruby/1.9.0
 /universal-darwin10.0/zlib.bundle
   Expected in: flat namespace
  in
 /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/site_ruby/1.9.0
 /universal-darwin10.0/zlib.bundle -
 /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/site_ruby/1.9.0
 /universal-darwin10.0/zlib.bundle'
 *** Call stack at first throw:
 (
 0   CoreFoundation  0x7fff8798a444
 __exceptionPreprocess + 180
 1   libobjc.A.dylib 0x7fff813f00f3
 objc_exception_throw + 45
 2   libmacruby.dylib0x00010017d065
 rb_vm_raise + 437
 3   libmacruby.dylib0x000100041bcb
 rb_f_raise + 43
 4   libmacruby.dylib0x00010016d4f4
 rb_vm_dispatch + 8116
 5   custom_require.rbo  0x0001017b9a27
 MREP_0B393304CCFA41789C8389403602EC21_ruby_scope2 + 647
 )

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #457: (svn 3050) MacGem crashed with "Symbol not found: _rb_yield"

2009-11-25 Thread MacRuby
#457: (svn 3050) MacGem crashed with "Symbol not found: _rb_yield"
-+--
 Reporter:  valerii.hi...@…  |Owner:  lsansone...@…
 Type:  defect   |   Status:  closed   
 Priority:  trivial  |Milestone:  MacRuby 0.5  
Component:  MacRuby  |   Resolution:  invalid  
 Keywords:   |  
-+--
Changes (by vincent.isamb...@…):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 You need to do a rake clean:ext; rake; sudo rake install because there is
 a problem in the build system that does not always rebuild extensions when
 it should.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #458: odd debug messages during NSPredicate.prediateWithFormat:argumentArray:

2009-11-25 Thread MacRuby
#458: odd debug messages during NSPredicate.prediateWithFormat:argumentArray:
-+--
 Reporter:  jordan.breed...@…|   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:   
Component:  MacRuby  |Keywords:   
-+--
 {{{
 419 jor...@thetourist ~ > macirb
 irb(main):001:0> NSPredicate.predicateWithFormat("NOT (SELF in %@)",
 argumentArray: [[1,2,3,4]])
 2009-11-25 10:20:35.508 macruby[56390:903] *** -[NSRecursiveLock unlock]:
 lock ( '(null)') unlocked when not locked
 2009-11-25 10:20:35.512 macruby[56390:903] *** Break on _NSLockError() to
 debug.
 => #
 irb(main):002:0>
 }}}

 Happens with a stored array as well:
 {{{
 420 jor...@thetourist ~ > macirb
 irb(main):001:0> sampleArray = [1,2,3,4]
 => [1, 2, 3, 4]
 irb(main):002:0> NSPredicate.predicateWithFormat("NOT (SELF in %@)",
 argumentArray: [sampleArray])
 2009-11-25 10:22:29.606 macruby[56408:903] *** -[NSRecursiveLock unlock]:
 lock ( '(null)') unlocked when not locked
 2009-11-25 10:22:29.610 macruby[56408:903] *** Break on _NSLockError() to
 debug.
 => #
 irb(main):003:0>
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #459: Error starting macruby

2009-11-25 Thread MacRuby
#459: Error starting macruby
---+
 Reporter:  nex...@…   |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  minor  |   Milestone:   
Component:  MacRuby|Keywords:  macirb   
---+
 I have installed MacRuby on MacBook (32bit) running fresh snow leopard
 with xcode installed.

 After that Xcode MacRuby default projects seems to work but macirb not
 working raise following error.

 {{{
 /usr/local/bin/macirb:in `': undefined method `bind' for
 IRB::SLex:Class (NoMethodError)
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #459: Error starting macruby

2009-11-25 Thread MacRuby
#459: Error starting macruby
---+
 Reporter:  nex...@…   |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  minor  |   Milestone:   
Component:  MacRuby|Keywords:  macirb   
---+

Comment(by nex...@…):

 MacRuby version:

 {{{
 ~$ macruby -v
 MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0, i386]
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #459: Error starting macruby

2009-11-25 Thread MacRuby
#459: Error starting macruby
---+
 Reporter:  nex...@…   |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  minor  |   Milestone:   
Component:  MacRuby|Keywords:  macirb   
---+

Comment(by nex...@…):

 Looks like duplicate of #448
 Please close it, I'm not able to.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #459: Error starting macruby

2009-11-25 Thread MacRuby
#459: Error starting macruby
---+
 Reporter:  nex...@…   |Owner:  lsansone...@…
 Type:  defect |   Status:  closed   
 Priority:  minor  |Milestone:   
Component:  MacRuby|   Resolution:  duplicate
 Keywords:  macirb |  
---+
Changes (by mattaimone...@…):

  * status:  new => closed
  * resolution:  => duplicate


-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] A path to linking rbo files into one executable in Xcode

2009-11-25 Thread Dylan Bruzenak
Hi all,

First, great work with the 0.5b2 release. I'm starting to use this for more
serious development and it does most of the things I need very well. After a
brief struggle last night I managed to get the code for one of my projects
compiling using the new macruby_deploy method and it works like a charm.

However, I would like to include the .rbo files in the same executable
inside the .app bundle as my objc files, rather than as separate files in
the resources directory.

To that end I defined a build rule that picks up .rb files and uses macrubyc
to compile them. I moved the .rb files into the 'compile sources' build
step, which causes the output .o files to be included in the excutable.

I then ran into an obvious snag: the ruby environment isn't intialized and
the classes are not being pulled in. After some investigation of the rubyc
file I can see that you're creating a custom .mm file that calls a number of
set up methods for the runtime and an MREP_UUID function for each class. A
few questions:

1.) Is there a way that I can find these MREP function names and call them
dynamically ? I was considering modifying the generator to output a .m file
with a class that just has an init method that calls these, but it isn't
compatible with the build rule approach above.
2.) Is there an easier way to set up this environment than the code below ?

ruby_sysinit(&argc, &argv);
if (argc > 0) {
argc--;
argv++;
}
ruby_init();
ruby_set_argv(argc, argv);
rb_vm_init_compiler();
try {
void *self = rb_vm_top_self();
//MREP FUNCTION CALLS GO HERE :)
}
catch (...) {
rb_vm_print_current_exception();
rb_exit(1);
}
rb_exit(0);

3.) Am I nuts ? If there's a much easier way to do this, please let me know
:)

thanks!
- Dylan
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #458: odd debug messages during NSPredicate.prediateWithFormat:argumentArray:

2009-11-25 Thread MacRuby
#458: odd debug messages during NSPredicate.prediateWithFormat:argumentArray:
-+--
 Reporter:  jordan.breed...@…|Owner:  lsansone...@…
 Type:  defect   |   Status:  closed   
 Priority:  blocker  |Milestone:   
Component:  MacRuby  |   Resolution:  invalid  
 Keywords:   |  
-+--
Changes (by lsansone...@…):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 This isn't a MacRuby bug, the log happens in Cocoa. You probably need to
 initialize something before using NSPredicate.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #458: odd debug messages during NSPredicate.prediateWithFormat:argumentArray:

2009-11-25 Thread MacRuby
#458: odd debug messages during NSPredicate.prediateWithFormat:argumentArray:
-+--
 Reporter:  jordan.breed...@…|Owner:  lsansone...@…
 Type:  defect   |   Status:  closed   
 Priority:  blocker  |Milestone:   
Component:  MacRuby  |   Resolution:  invalid  
 Keywords:   |  
-+--

Comment(by jordan.breed...@…):

 Can this one get reopened? I don't see the error in Objective-C and Cocoa.
 Only in MacRuby thus far, I haven't tried Nu or F-Script yet with this
 example.

 All of these work without the error though:

 http://gist.github.com/242969
 http://gist.github.com/242971
 http://gist.github.com/242976

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #458: odd debug messages during NSPredicate.prediateWithFormat:argumentArray:

2009-11-25 Thread MacRuby
#458: odd debug messages during NSPredicate.prediateWithFormat:argumentArray:
-+--
 Reporter:  jordan.breed...@…|Owner:  lsansone...@…
 Type:  defect   |   Status:  reopened 
 Priority:  blocker  |Milestone:   
Component:  MacRuby  |   Resolution:   
 Keywords:   |  
-+--
Changes (by lsansone...@…):

  * status:  closed => reopened
  * resolution:  invalid =>


Comment:

 Sorry about that, it looks like a bug of MacRuby since the ObjC/GC version
 works. Re-opening.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [macruby-changes] [3054] MacRuby/trunk/string.c

2009-11-25 Thread Jordan Breeding
Speaking of llvm-gcc, is the problem with clang and llvm-gcc builds not passing 
the test suite still there, or has that been fixed?

On Nov 25, 2009, at 17:15, [email protected] wrote:

> Revision
> 3054
> Author
> [email protected]
> Date
> 2009-11-25 15:15:05 -0800 (Wed, 25 Nov 2009)
> Log Message
> 
> fix llvm-gcc build
> Modified Paths
> 
> MacRuby/trunk/string.c
> Diff
> 
> Modified: MacRuby/trunk/string.c (3053 => 3054)
> 
> --- MacRuby/trunk/string.c2009-11-25 21:45:31 UTC (rev 3053)
> +++ MacRuby/trunk/string.c2009-11-25 23:15:05 UTC (rev 3054)
> @@ -5320,7 +5320,7 @@
>  return ((rb_bstr_t *)bstr)->data;
>  }
>  
> -inline void
> +void
>  rb_bytestring_set_wrapped_data(VALUE bstr, CFMutableDataRef data)
>  {
>  GC_WB(&((rb_bstr_t *)bstr)->data, data);
> ___
> macruby-changes mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-changes



smime.p7s
Description: S/MIME cryptographic signature
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [macruby-changes] [3054] MacRuby/trunk/string.c

2009-11-25 Thread Laurent Sansonetti

I can't reply... yet. Be patient :)

Laurent

On Nov 25, 2009, at 3:16 PM, Jordan Breeding wrote:

Speaking of llvm-gcc, is the problem with clang and llvm-gcc builds  
not passing the test suite still there, or has that been fixed?


On Nov 25, 2009, at 17:15, [email protected] wrote:


Revision
3054
Author
[email protected]
Date
2009-11-25 15:15:05 -0800 (Wed, 25 Nov 2009)
Log Message

fix llvm-gcc build
Modified Paths

• MacRuby/trunk/string.c
Diff

Modified: MacRuby/trunk/string.c (3053 => 3054)

--- MacRuby/trunk/string.c  2009-11-25 21:45:31 UTC (rev 3053)
+++ MacRuby/trunk/string.c  2009-11-25 23:15:05 UTC (rev 3054)

@@ -5320,7 +5320,7 @@

 return ((rb_bstr_t *)bstr)->data;

 }



-inline void

+void

 rb_bytestring_set_wrapped_data(VALUE bstr, CFMutableDataRef data)

 {

 GC_WB(&((rb_bstr_t *)bstr)->data, data);

___
macruby-changes mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-changes


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #454: String#getbyte not working?

2009-11-25 Thread MacRuby
#454: String#getbyte not working?
--+-
 Reporter:  p...@…|   Owner:  lsansone...@…
 Type:  defect|  Status:  new  
 Priority:  minor |   Milestone:  MacRuby 0.5  
Component:  MacRuby   |Keywords:   
--+-

Comment(by p...@…):

 Is String#getbyte on the roadmap somewhere. Given the new multibyte
 strings in Ruby 1.9, String#getbyte seems to be the only way to get the
 old behaviour of directly accessing bytes (rather than characters) in a
 string? OTOH I suppose there would be a Cocoa way to do that?

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #454: String#getbyte not working?

2009-11-25 Thread Brian Chapados
I'm pretty sure you can use NSString#characterAtIndex

s = "Brian"
s.characterAtIndex(0) # => 66

Brian

On Wed, Nov 25, 2009 at 4:46 PM, MacRuby  wrote:
> #454: String#getbyte not working?
> --+-
>  Reporter:  p...@…            |       Owner:  lsansone...@…
>     Type:  defect            |      Status:  new
>  Priority:  minor             |   Milestone:  MacRuby 0.5
> Component:  MacRuby           |    Keywords:
> --+-
>
> Comment(by p...@…):
>
>  Is String#getbyte on the roadmap somewhere. Given the new multibyte
>  strings in Ruby 1.9, String#getbyte seems to be the only way to get the
>  old behaviour of directly accessing bytes (rather than characters) in a
>  string? OTOH I suppose there would be a Cocoa way to do that?
>
> --
> Ticket URL: 
> MacRuby 
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #460: bug in CSV module

2009-11-25 Thread MacRuby
#460: bug in CSV module
+---
 Reporter:  ninec...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  blocker |   Milestone:   
Component:  MacRuby |Keywords:   
+---
 macruby raises TypeErrors in using csv module

 irb(main):001:0> require 'csv'
 => true

 irb(main):002:0> a = '1,2,3'
 => "1,2,3"

 irb(main):003:0> CSV.parse(a, ',')
 TypeError: can't convert NSMutableString into Hash
 from core:in `initialize'
 from core:in `assoc:'
 from
 
/Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/1.9.0/csv.rb:1549:in
 `initialize:'
 from core:in `[]:'
 from
 
/Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/1.9.0/csv.rb:1357:in
 `parse:'
 from (irb):3:in `'

 irb(main):004:0> CSV.open('test.csv', 'r', ',') { |r| puts r } # test.csv
 is '1,2,3'
 TypeError: can't convert NSMutableString into Integer
 from core:in `initialize'
 from
 
/Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/1.9.0/csv.rb:1326:in
 `open'
 from (irb):4:in `'

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #461: each_object: NoMethodError

2009-11-25 Thread MacRuby
#461: each_object: NoMethodError
-+--
 Reporter:  jordan.breed...@…|   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:   
Component:  MacRuby  |Keywords:   
-+--
 This code (from Patrick -- http://gist.github.com/242894):

 {{{
 module ObjectSpace
   def each_instance_of(klass)
 each_object do |obj|
   yield(obj) if obj.instance_of? klass
 end
   end

   def each_kind_of(klass)
 each_object do |obj|
   yield(obj) if obj.kind_of? klass
 end
   end
 end

 include ObjectSpace

 class Foo; end
 x, y, z = Foo.new, Foo.new, Foo.new

 class Bar; end
 a = Bar.new

 each_instance_of(Foo) { |x| p x }
 }}}

 This works in 1.8 and 1.9, but in MacRuby it currently gives this:

 {{{
 ./test.rb:3:in `each_instance_of:': undefined method `each_object' for
 main:TopLevel (NoMethodError)
 from ./test.rb:21:in `'
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #462: Net::HTTP Gives "Insecure Operation" When Using HTTPS

2009-11-25 Thread MacRuby
#462: Net::HTTP Gives "Insecure Operation" When Using HTTPS
---+
 Reporter:  cwdi...@…  |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  blocker|   Milestone:   
Component:  MacRuby|Keywords:   
---+
 Here's the code and the results:
 {{{
 irb(main):002:0> require 'net/https';require 'uri'
 => false
 irb(main):003:0> url = URI.parse('https://myverysecuresite.com')
 => #https://myverysecuresite.com>
 irb(main):004:0> req = Net::HTTP::Get.new(url.path)
 core:in `push:': Insecure operation: -r (SecurityError)
 from core:in `gets'
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] macruby 0.5 is 10x slower running rexml than MRI

2009-11-25 Thread Stephen Bannasch

I thought this was a very strange result:

$ ruby xml_benchmark_rexml.rb
user system  totalreal
rexml   8.99   0.54   9.53 (  9.609303)
rexml   8.90   0.54   9.44 (  9.555908)

$ macruby xml_benchmark_rexml.rb
user system  totalreal
rexml  90.91   3.24  94.15 ( 53.791530)
rexml  92.76   3.11  95.87 ( 52.334891)


xml_benchmark_rexml.rb and associated xml data file are located here:

http://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks/
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel