{"action":"created","issue":{"url":"https://api.github.com/repos/toy/image_size/issues/11","repository_url":"https://api.github.com/repos/toy/image_size","labels_url":"https://api.github.com/repos/toy/image_size/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/toy/image_size/issues/11/comments","events_url":"https://api.github.com/repos/toy/image_size/issues/11/events","html_url":"https://github.com/toy/image_size/issues/11","id":149424253,"number":11,"title":"Not working in ruby 2.3.0","user":{"login":"Spandana-Sai","id":14251487,"avatar_url":"https://avatars.githubusercontent.com/u/14251487?v=3","gravatar_id":"","url":"https://api.github.com/users/Spandana-Sai","html_url":"https://github.com/Spandana-Sai","followers_url":"https://api.github.com/users/Spandana-Sai/followers","following_url":"https://api.github.com/users/Spandana-Sai/following{/other_user}","gists_url":"https://api.github.com/users/Spandana-Sai/gists{/gist_id}","starred_url":"https://api.github.com/users/Spandana-Sai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spandana-Sai/subscriptions","organizations_url":"https://api.github.com/users/Spandana-Sai/orgs","repos_url":"https://api.github.com/users/Spandana-Sai/repos","events_url":"https://api.github.com/users/Spandana-Sai/events{/privacy}","received_events_url":"https://api.github.com/users/Spandana-Sai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-19T10:56:20Z","updated_at":"2016-04-20T08:02:26Z","closed_at":null,"body":"Can you please help out. Imagesize is  not woking with ruby 2.3.0\r\n[1] pry(main)> open(\"#{thumb_nail['url']}\", 'rb') do |fh|\r\n[1] pry(main)*   data = fh.read \r\n[1] pry(main)*   p ImageSize.new(data).size \r\n[1] pry(main)* end  \r\n[nil, nil]\r\n=> [nil, nil]\r\nBut in ruby 1.8 the output is as follows for the same image:\r\n[7] pry(main)> open(\"#{thumb_nail['url']}\", 'rb') do |fh|\r\n[7] pry(main)*   data = fh.read \r\n[7] pry(main)*   p ImageSize.new(data).size \r\n[7] pry(main)* end  \r\n[1280, 720]\r\n=> nil\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/toy/image_size/issues/comments/212314800","html_url":"https://github.com/toy/image_size/issues/11#issuecomment-212314800","issue_url":"https://api.github.com/repos/toy/image_size/issues/11","id":212314800,"user":{"login":"toy","id":18144,"avatar_url":"https://avatars.githubusercontent.com/u/18144?v=3","gravatar_id":"","url":"https://api.github.com/users/toy","html_url":"https://github.com/toy","followers_url":"https://api.github.com/users/toy/followers","following_url":"https://api.github.com/users/toy/following{/other_user}","gists_url":"https://api.github.com/users/toy/gists{/gist_id}","starred_url":"https://api.github.com/users/toy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toy/subscriptions","organizations_url":"https://api.github.com/users/toy/orgs","repos_url":"https://api.github.com/users/toy/repos","events_url":"https://api.github.com/users/toy/events{/privacy}","received_events_url":"https://api.github.com/users/toy/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T08:02:26Z","updated_at":"2016-04-20T08:02:26Z","body":"As I use open on url, I've assumed that you are using `open-uri`, so it should work with `ImageSize.path`.\r\nYou've got a `NoMethodError` for `path`, which suggests that you may be using an outdated version of `image_size`. Which version of `image_size` are you using? `ImageSize.path` is available from v1.1.0 - https://github.com/toy/image_size/blob/v1.1.0/lib/image_size.rb#L43.\r\n\r\nFollowing code works for me in these rubies: 1.8.7, 1.9.3, 2.0.0, 2.1.8, 2.2.4, 2.3.0, jruby-1.7.24\r\nAnd outputs three times `[420, 420]`\r\n\r\n```ruby\r\nrequire 'rubygems' # for ruby 1.x\r\nrequire 'image_size'\r\nrequire 'open-uri'\r\n\r\np ImageSize.path('https://avatars0.githubusercontent.com/u/14251487?v=3').size\r\n\r\nopen('https://avatars0.githubusercontent.com/u/14251487?v=3', 'rb') do |fh|\r\n  p ImageSize.new(fh).size\r\nend\r\n\r\nopen('https://avatars0.githubusercontent.com/u/14251487?v=3', 'rb') do |fh|\r\n  data = fh.read\r\n  p ImageSize.new(data).size\r\nend\r\n```"}}