{"action":"closed","issue":{"url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/issues/243","labels_url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/issues/243/labels{/name}","comments_url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/issues/243/comments","events_url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/issues/243/events","html_url":"https://github.com/tim-vandecasteele/grape-swagger/issues/243","id":66934595,"number":243,"title":"memory issues with large ranges","user":{"login":"carlshimer","id":247782,"avatar_url":"https://avatars.githubusercontent.com/u/247782?v=3","gravatar_id":"","url":"https://api.github.com/users/carlshimer","html_url":"https://github.com/carlshimer","followers_url":"https://api.github.com/users/carlshimer/followers","following_url":"https://api.github.com/users/carlshimer/following{/other_user}","gists_url":"https://api.github.com/users/carlshimer/gists{/gist_id}","starred_url":"https://api.github.com/users/carlshimer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlshimer/subscriptions","organizations_url":"https://api.github.com/users/carlshimer/orgs","repos_url":"https://api.github.com/users/carlshimer/repos","events_url":"https://api.github.com/users/carlshimer/events{/privacy}","received_events_url":"https://api.github.com/users/carlshimer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/labels/confirmed%20bug","name":"confirmed bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-07T16:42:58Z","updated_at":"2015-04-07T18:21:16Z","closed_at":"2015-04-07T18:21:16Z","body":"I had an API definition that looked like:\r\n\r\nrequires :blahvalue, :type => Integer, values: 1262358112..3000000000, :desc => \"foo\"\r\n\r\nThis was designed to use a range to check to do basic validation. However, this blows up in the following code:\r\n\r\nenum_values   = enum_values.to_a if enum_values && enum_values.is_a?(Range)\r\n\r\nto_a expands the range completely into an array.  Which is very dangerous :)\r\n"}}