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

dont monkeypatch String with #snakecase #984

Closed
pcai opened this issue Oct 17, 2022 · 1 comment · Fixed by #988
Closed

dont monkeypatch String with #snakecase #984

pcai opened this issue Oct 17, 2022 · 1 comment · Fixed by #988

Comments

@pcai
Copy link
Member

pcai commented Oct 17, 2022

Bug report

Current behavior:
savon should avoid monkeypatching a new method String#snakecase on load. this behavior is undocumented, specific to savon's needs as a library, and shouldn't unexpectedly change behavior of code the host application relies on.

Steps to reproduce current behavior:

gem install savon
irb

then:

"asdf".snakecase
(irb):1:in `<main>': undefined method `snakecase' for "asdf":String (NoMethodError)

require 'savon'
=> true

"asdf".snakecase
=> "asdf"

Expected behavior:
savon does not monkeypatch String on load.

System information:

  • ruby version: all
  • savon version: all
@pcai
Copy link
Member Author

pcai commented Oct 17, 2022

related: savonrb/wasabi#59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant