[MacRuby] #1316: net/http form_data chokes on instances of NSString
#1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ In trying to use net/http within a macruby application, I discovered that calling Net::HTTP::Post#set_form_data with a hash whose values are NSStrings raises an error whereas it works fine with ruby Strings. Here is the error: /Users/greg/code/macruby-bug-report/NetHttpWeirdness/net-http- weirdness.rb:14:in `<main>': method `force_encoding:' does not work on NSStrings (ArgumentError) I've created a repo on Github that documents the problem in both a shell script and a full-fledged XCode project: https://github.com/atduskgreg/NetHTTPWeirdness -- Ticket URL: <http://www.macruby.org/trac/ticket/1316> MacRuby <http://macruby.org/>
#1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Comment(by greg.borenstein@…): Looking around the tracker a bit more, I notice that this bug seems to have been reported before an in here: http://www.macruby.org/trac/ticket/689 That bug was closed along a long time ago, but I am still seeing this problem in MacRuby 0.10 installed from the most recent stable version available on the website and running with XCode 4. Just wanted to make it clear that I wasn't simply re-reporting long- standing bugs. Or at least that I'm doing my best not to. Thanks! -- Ticket URL: <http://www.macruby.org/trac/ticket/1316#comment:1> MacRuby <http://macruby.org/>
#1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Comment(by watson1978@…): This ticket would seem to duplicate #1268. -- Ticket URL: <http://www.macruby.org/trac/ticket/1316#comment:2> MacRuby <http://macruby.org/>
#1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Comment(by greg.borenstein@…): You're right, they're duplicates. In the meantime I found my own work around which is similar to the one described in that other ticket of implicitly transforming the NSString into a String thusly: "#{my_ns_string}" before passing it to set_form_data in its argument hash. -- Ticket URL: <http://www.macruby.org/trac/ticket/1316#comment:3> MacRuby <http://macruby.org/>
#1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------------+------------------------------------ Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: I think the problem should be fixed by https://github.com/MacRuby/MacRuby/commit/3e200e8341a17797c8af79d7b781372a27..., please give master branch or tonight's nightly build a try. -- Ticket URL: <http://www.macruby.org/trac/ticket/1316#comment:4> MacRuby <http://macruby.org/>
#1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------------+------------------------------------ Comment(by greg.borenstein@…): Do you mean this build? http://www.macruby.org/files/nightlies/macruby_nightly-2011-06-06.pkg Or will it be the next one? This problem is still present for me with that build. -- Ticket URL: <http://www.macruby.org/trac/ticket/1316#comment:5> MacRuby <http://macruby.org/>
#1316: net/http form_data chokes on instances of NSString ---------------------------------------+------------------------------------ Reporter: greg.borenstein@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------------+------------------------------------ Comment(by watson1978@…): macruby_nightly-2011-06-06.pkg made based on https://github.com/MacRuby/MacRuby/commit/62f32b21b97786ff2d4b88e3ae3522221f... {{{ $ macruby -e 'p MACRUBY_REVISION' "git commit 62f32b21b97786ff2d4b88e3ae3522221f3452c6" }}} Please wait next time. -- Ticket URL: <http://www.macruby.org/trac/ticket/1316#comment:6> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby