{"comment":{"commit_id":"cb7f58ae6ca9515bd3924f38eefc76ad08aefe97","created_at":"2011-12-04T04:00:24Z","position":2,"updated_at":"2011-12-04T04:00:24Z","user":{"gravatar_id":"5c11b2e624af2cb13797e47442067ea6","id":207112,"url":"https://api.github.com/users/gmile","avatar_url":"https://secure.gravatar.com/avatar/5c11b2e624af2cb13797e47442067ea6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"gmile"},"body":"You cannot do things like this. Hash has determined `key` and `values`, these are strict. While `key` can be an object of arbitrary nature (including `Range`), to access the value under that key you need to pass the exact key. For example:\n\n```ruby\nx = { 1..10 => 'hello, world' }\n\nx[1..10] # => \"hello, world'\nx[5]     # => nil\n```\nThus trick with range should not and will not work. You should find a different solution for this task.","line":2,"id":766766,"path":"book/branching/if_else/task-19.rb","html_url":"https://github.com/John-Li/my_programs/commit/cb7f58ae6c#commitcomment-766766","url":"https://api.github.com/repos/John-Li/my_programs/comments/766766"}}