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

Cloning node value when hash #21

Merged
merged 4 commits into from
Mar 29, 2013
Merged

Cloning node value when hash #21

merged 4 commits into from
Mar 29, 2013

Conversation

camol
Copy link
Contributor

@camol camol commented Mar 20, 2013

Hi

I have improved a bit of your code. I've mentioned the problem here savonrb/savon#410 . When me make variables from instances of hash it is being not copyied totaly. In some parts it is being referenced, so when delete keys in node_value variable, you are deleting them in the original hash and it is not too good :)

@rubiii
Copy link
Contributor

rubiii commented Mar 20, 2013

great! thanks for following up on this :) could you add specs to verify the change?

@camol
Copy link
Contributor Author

camol commented Mar 20, 2013

Your welcome. I wilk ASAP ;)

Camol
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Wednesday, 20 March 2013 at 18:26, Daniel Harrington wrote:

great. thanks for following up on this :) could you add specs to verify the change?


Reply to this email directly or view it on GitHub (#21 (comment)).

@pigoz
Copy link

pigoz commented Mar 25, 2013

I had the same problem today, I had error 400 replies from the second request into some SOAP service. As I'm using this functionality in the soap_header which seems to get called for each request.

irb(main):033:0> x = {"m:AuthHeader"=>{:"@xmlns:m"=>"xxx", "m:Username"=>"xxx", "m:Password"=>"xxx2"}}
=> {"m:AuthHeader"=>{:"@xmlns:m"=>"xxx", "m:Username"=>"xxx", "m:Password"=>"xxx2"}}
irb(main):035:0> Gyoku.xml(x)
=> "<m:AuthHeader xmlns:m=\"xxx\"><m:Username>xxx</m:Username><m:Password>xxx2</m:Password></m:AuthHeader>"
irb(main):036:0> x
=> {"m:AuthHeader"=>{"m:Username"=>"xxx", "m:Password"=>"xxx2"}}
irb(main):037:0> Gyoku.xml(x)
=> "<m:AuthHeader><m:Username>xxx</m:Username><m:Password>xxx2</m:Password></m:AuthHeader>"

@camol
Copy link
Contributor Author

camol commented Mar 28, 2013

Add to your Gemfile Gyoku implicitly and point to my fork ;) it will make it ok.

@pigoz
Copy link

pigoz commented Mar 28, 2013

Well your commits fail on TravisCI on Ruby 1.8.7 and sadly we are still running Ruby 1.8.7 on this particular project (can't move it just yet). As a matter of fact I think you should fix them and use the old hash syntax so that the commits can be merged into master. If you have no time I'll gladly clean it up.

@camol
Copy link
Contributor Author

camol commented Mar 28, 2013

Strange now test fails. On 1.8.7 the nodes in the xml are switched :\ I think this maybe some kind of a different bug.

rubiii added a commit that referenced this pull request Mar 29, 2013
Cloning node value when hash
@rubiii rubiii merged commit c24b6d6 into savonrb:master Mar 29, 2013
@rubiii
Copy link
Contributor

rubiii commented Mar 29, 2013

awesome 😃 thank you very much!

This was referenced Jul 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants