Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `start_with?' #33

Closed
sangeth opened this issue Feb 2, 2010 · 1 comment
Closed

undefined method `start_with?' #33

sangeth opened this issue Feb 2, 2010 · 1 comment

Comments

@sangeth
Copy link

sangeth commented Feb 2, 2010

Running into an error when parsing a WSDL file. Get the following error:

NoMethodError: undefined method `start_with?' for "name":String
from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/savon-0.7.3/lib/savon/wsdl_stream.rb:55:in `read_namespaces'

Looking at that line in the source I notice that start_with? is being used on keys when parsing for namespaces. Ruby's API doesn't define a method start_with? for Strings, though RoR does.

Would it be better to do:

@namespaces[key.split(":").last] = value if key =~ /^xmlns:/

instead of:

@namespaces[key.split(":").last] = value if key.start_with? "xmlns:"
@rubiii
Copy link
Contributor

rubiii commented Feb 2, 2010

sorry for this stupid mistake. it somehow slipped in when i merged some contributions. i know i say and wanted to change it, but yeah ...

i released a hotfix (version 0.7.4) for this problem just now: http://github.com/rubiii/savon/commit/1439298f958accd45a6445226afeb0e61178a262

thanks!

calamitas pushed a commit to calamitas/savon that referenced this issue Jun 7, 2011
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants