[MacRuby-devel] [MacRuby] #208: Making #binding public returns wrong binding.

2009-01-16 Thread MacRuby
#208: Making #binding public returns wrong binding.
-+--
 Reporter:  eloy.de.en...@…  |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:   
Component:  MacRuby  |Keywords:   
-+--
 Making the binding instance method of a class public does not return the
 expected binding. Rather it returns the binding from where the caller.

 Adding a public instance method which returns its private binding works as
 expected though. So I'm guessing it goes wrong somewhere in the ‘making a
 method public’ process.

 Consider:

 {{{
 class Foo
   def name
 "foo"
   end

   def b
 binding
   end
 end

 # untitled:13:in `eval': undefined local variable or method `name' for
 main:NSObject (NameError)
 #
 # p eval("name", Foo.new.send(:binding))

 # untitled:17:in `eval': undefined local variable or method `name' for
 main:NSObject (NameError)
 #
 # Foo.send(:public, :binding)
 # p eval("name", Foo.new.binding)

 # "foo"
 p eval("name", Foo.new.b)
 }}}

 And here you can see that it in fact returns the binding of the caller,
 not the Foo instance:

 {{{
 lvar = "lvar"
 Foo.send(:public, :binding)
 p eval("local_variables", Foo.new.binding) # => [:lvar]
 }}}

-- 
Ticket URL: 
MacRuby 

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


[MacRuby-devel] [MacRuby] #209: HotCocoa problems in trunk (with patch)

2009-01-16 Thread MacRuby
#209: HotCocoa problems in trunk (with patch)
+---
 Reporter:  vincent.isamb...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  major   |   Milestone:   
Component:  MacRuby |Keywords:   
+---
 HotCocoa does not work in the latest trunk because of the fix in the
 namespacing issue.
 Attached a patch to fix HotCocoa.

-- 
Ticket URL: 
MacRuby 

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