[MacRuby] #995: NoMethodError for initialization on MacRuby but works fine on CRuby
#995: NoMethodError for initialization on MacRuby but works fine on CRuby ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- When using the jiraSOAP gem (version 0.4.0) and I try to create a new JIRA::JIRAService object with #new I always get a NoMethodError on MacRuby, but when I run the gem in CRuby the initialization works fine. The source for the gem is on github at github.com/Marketcircle/jiraSOAP -- Ticket URL: <http://www.macruby.org/trac/ticket/995> MacRuby <http://macruby.org/>
#995: NoMethodError for initialization on MacRuby but works fine on CRuby ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): So it turns out the problem is occurring because I call super from my #initialization method (JIRA::JIRAService) and there is no #initialization in the parent class (Handsoap::Service). Once I remove this call, which I don't really need, everything works. However, if I try out a simple example that should reproduce this problem nothing bad happens (code executes fine). At this point, what is happening is beyond my current understanding of Ruby. -- Ticket URL: <http://www.macruby.org/trac/ticket/995#comment:1> MacRuby <http://macruby.org/>
#995: NoMethodError for initialization on MacRuby but works fine on CRuby ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: | ------------------------------------+--------------------------------------- Changes (by watson1978@…): * status: new => closed * resolution: => invalid Comment: I tried with MacRuby Trunk HEAD: {{{ $ sudo macgem install jiraSOAP $ cat tt.rb require 'rubygems' require 'jiraSOAP' JIRA::JIRAService.new 'http://jira.yourSite.com:8080' $ macruby tt.rb /Users/watson/tmp/tt.rb:2:in `<main>': no such file to load -- lib/jiraSOAP/macruby_bonuses.rb (LoadError) }}} It seems to make a mistake in a file pass. I changed as following and works fine. {{{ #!diff diff tmp/jiraSOAP/lib/jiraSOAP.rb jiraSOAP.rb 16c16 < require 'lib/jiraSOAP/macruby_bonuses.rb' if RUBY_ENGINE == 'macruby' ---
require 'jiraSOAP/macruby_bonuses.rb' if RUBY_ENGINE == 'macruby' }}}
-- Ticket URL: <http://www.macruby.org/trac/ticket/995#comment:2> MacRuby <http://macruby.org/>
#995: NoMethodError for initialization on MacRuby but works fine on CRuby ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | ------------------------------------+--------------------------------------- Changes (by mrada@…): * status: closed => reopened * resolution: invalid => Comment: First, thank you for pointing out the bug. With regards to the bug: you are using a newer version or the gem that is working around the issue reported here. If you change jiraSOAP/lib/jiraSOAP/JIRAService.rb to add a call to super in #initialize you will see that the bug is still there. (see attached diff). -- Ticket URL: <http://www.macruby.org/trac/ticket/995#comment:3> MacRuby <http://macruby.org/>
#995: NoMethodError for initialization on MacRuby but works fine on CRuby ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: | ------------------------------------+--------------------------------------- Comment(by mrada@…): The error will only occur if #initialize takes an argument. MRI does not raise an error in this case. If #initialize takes no arguments then everything is fine. -- Ticket URL: <http://www.macruby.org/trac/ticket/995#comment:4> MacRuby <http://macruby.org/>
#995: NoMethodError for calling super from #initialize on MacRuby, but works fine on CRuby ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: #reduction | ------------------------------------+--------------------------------------- Changes (by eloy.de.enige@…): * keywords: => #reduction * milestone: => MacRuby 1.0 Old description:
When using the jiraSOAP gem (version 0.4.0) and I try to create a new JIRA::JIRAService object with #new I always get a NoMethodError on MacRuby, but when I run the gem in CRuby the initialization works fine.
The source for the gem is on github at github.com/Marketcircle/jiraSOAP
New description: The error will only occur if #initialize takes an argument. MRI does not raise an error in this case. If #initialize takes no arguments then everything is fine. -- Comment: Screening for 1.0 -- Ticket URL: <http://www.macruby.org/trac/ticket/995#comment:5> MacRuby <http://macruby.org/>
#995: NoMethodError for calling super from #initialize on MacRuby, but works fine on CRuby ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: reopened Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Resolution: Keywords: #reduction | ------------------------------------+--------------------------------------- Comment(by eloy.de.enige@…): I should add the we replaced the original ticket description as it added irrelevant noise, the same can be said for the comments which can be ignored. -- Ticket URL: <http://www.macruby.org/trac/ticket/995#comment:6> MacRuby <http://macruby.org/>
#995: NoMethodError for calling super from #initialize on MacRuby, but works fine on CRuby ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: #reduction | ------------------------------------+--------------------------------------- Changes (by lsansonetti@…): * status: reopened => closed * resolution: => fixed * milestone: MacRuby 1.0 => MacRuby 0.11 Comment: Should be fixed by https://github.com/MacRuby/MacRuby/commit/fc0895b088d77fadffcfd93999348fcc29... -- Ticket URL: <http://www.macruby.org/trac/ticket/995#comment:7> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby