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

Doesn't work well with frozen strings #172

Closed
Mrjaco12 opened this issue Mar 6, 2017 · 3 comments
Closed

Doesn't work well with frozen strings #172

Mrjaco12 opened this issue Mar 6, 2017 · 3 comments

Comments

@Mrjaco12
Copy link

Mrjaco12 commented Mar 6, 2017

ruby version - ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
VideoInfo version - 2.7

Reproduce:

url = "//player.vimeo.com/video/22439234".freeze
VideoInfo.new(url)

Error:

RuntimeError: can't modify frozen String
from /usr/local/lib/ruby/gems/2.4.0/gems/video_info-2.7/lib/video_info/providers/vkontakte.rb:16:in 'strip!'

Looks like there are two places in the vkontakte.rb file where strip! is used. It should be fairly easy to move those over to .strip. I can work up a PR sometime later this week if that would be welcome.

@vheuken
Copy link
Collaborator

vheuken commented Mar 6, 2017 via email

@vheuken
Copy link
Collaborator

vheuken commented Mar 7, 2017

@Mrjaco12 Fix should be in master now! It'll be pushed out in a new version soon enough. For now, you can use this in your Gemfile:

gem 'video_info', git: 'https://github.com/thibaudgg/video_info.git'

@vheuken vheuken closed this as completed Mar 7, 2017
@Mrjaco12
Copy link
Author

Mrjaco12 commented Mar 7, 2017

Dude, great work! Thanks a ton. It's always great to use an active well maintained project.

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

No branches or pull requests

2 participants