[MacRuby] #919: URI::HTTP path_query method is private in MacRuby but not in MRI
#919: URI::HTTP path_query method is private in MacRuby but not in MRI ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- When I use the handsoap gem to setup a service, I notice a problem in the library that does not exist when I run it using MRI. MacRuby is telling me that I am trying to access a method that is private. I have attached a small piece of code to show the problem (using the handsoap gem). It will not display the correct behaviour on MRI, only the potential bug behaviour on MacRuby. -- Ticket URL: <http://www.macruby.org/trac/ticket/919> MacRuby <http://macruby.org/>
#919: URI::HTTP path_query method is private in MacRuby but not in MRI ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by watson1978@…): It seems that URI::HTTP#path_query is private method within CRuby also.[[BR]] Another problems? {{{ #!ruby #$ cat test_uri.rb require 'uri' uri = URI("http://www.google.co.jp/search?q=macruby") p uri.class p uri.path_query }}} {{{ $ ruby19 -v test_uri.rb ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0] URI::HTTP test_uri.rb:6:in `<main>': private method `path_query' called for #<URI::HTTP:0x0000010109f388> (NoMethodError) $ DYLD_LIBRARY_PATH=. ./macruby -I./lib ~/tmp/test_uri.rb URI::HTTP private method `path_query' called for #<URI::HTTP:0x20022df80> (NoMethodError) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/919#comment:1> MacRuby <http://macruby.org/>
#919: URI::HTTP path_query method is private in MacRuby but not in MRI ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by mrada@…): Replying to [comment:1 watson1978@…]:
It seems that URI::HTTP#path_query is private method within CRuby also.[[BR]] Another problems? {{{ #!ruby #$ cat test_uri.rb require 'uri'
uri = URI("http://www.google.co.jp/search?q=macruby") p uri.class p uri.path_query }}}
{{{ $ ruby19 -v test_uri.rb ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0] URI::HTTP test_uri.rb:6:in `<main>': private method `path_query' called for #<URI::HTTP:0x0000010109f388> (NoMethodError)
$ DYLD_LIBRARY_PATH=. ./macruby -I./lib ~/tmp/test_uri.rb URI::HTTP private method `path_query' called for #<URI::HTTP:0x20022df80> (NoMethodError) }}}
I tried your code and got your result. I double checked my stuff and I am still getting the original error in my code only when I run it with MacRuby (through macrake test) and not when I run it with Ruby 1.9.2 (through rake test). I'm completely lost here, not sure if there is some other hidden problem in MacRuby or perhaps the Handsoap gem. -- Ticket URL: <http://www.macruby.org/trac/ticket/919#comment:2> MacRuby <http://macruby.org/>
#919: URI::HTTP path_query method is private in MacRuby but not in MRI ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ------------------------------------+--------------------------------------- Comment(by lsansonetti@…): I can see the following code in handsoap/http/drivers/net_http_driver.rb: {{{ ::URI::Generic.send(:public, :path_query) # hackety hack path = url.path_query }}} Besides the fact that this is a really bad hack, I assume this isn't working in MacRuby, since the method remains private. -- Ticket URL: <http://www.macruby.org/trac/ticket/919#comment:3> MacRuby <http://macruby.org/>
#919: URI::HTTP path_query method is private in MacRuby but not in MRI ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.7 Comment: Should be fixed in r4544. -- Ticket URL: <http://www.macruby.org/trac/ticket/919#comment:4> MacRuby <http://macruby.org/>
#919: URI::HTTP path_query method is private in MacRuby but not in MRI ------------------------------------+--------------------------------------- Reporter: mrada@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | ------------------------------------+--------------------------------------- Comment(by mrada@…): Yup, fixed an working. Thank you. -- Ticket URL: <http://www.macruby.org/trac/ticket/919#comment:5> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby