Closed syoder closed 4 years ago
Should I submit a PR for this?
@syoder Thank you for brining this to our attention! We will take a look an implement your solution!
Hey @syoder we have added your requested fixes and have pushed them to the newest version of the urbanairship
gem here: https://rubygems.org/gems/urbanairship. Thank you!
Thanks for the quick response!
Expected Behavior
No warnings should be emitted
Current Behavior
A warning is emitted when starting our Rails app which includes this gem. Here's the warning:
Possible Solution
the logic in this method is not correct and doesn't do what it looks like it's supposed to: https://github.com/urbanairship/ruby-library/blob/master/lib/urbanairship/devices/mms_notification.rb#L32-L36
Instead, it should be something like:
The way it's written, it will never throw an
ArgumentError
because all those string literals will always evaluate totrue
.Steps to Reproduce
Include your gem in a Rails 5 / Ruby 2.5.x app and start a rails console.