{"action":"created","issue":{"url":"https://api.github.com/repos/manastech/crystal/issues/549","labels_url":"https://api.github.com/repos/manastech/crystal/issues/549/labels{/name}","comments_url":"https://api.github.com/repos/manastech/crystal/issues/549/comments","events_url":"https://api.github.com/repos/manastech/crystal/issues/549/events","html_url":"https://github.com/manastech/crystal/issues/549","id":69053326,"number":549,"title":"Strange behavior of the \"while\" expression","user":{"login":"ssvb","id":78642,"avatar_url":"https://avatars.githubusercontent.com/u/78642?v=3","gravatar_id":"","url":"https://api.github.com/users/ssvb","html_url":"https://github.com/ssvb","followers_url":"https://api.github.com/users/ssvb/followers","following_url":"https://api.github.com/users/ssvb/following{/other_user}","gists_url":"https://api.github.com/users/ssvb/gists{/gist_id}","starred_url":"https://api.github.com/users/ssvb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssvb/subscriptions","organizations_url":"https://api.github.com/users/ssvb/orgs","repos_url":"https://api.github.com/users/ssvb/repos","events_url":"https://api.github.com/users/ssvb/events{/privacy}","received_events_url":"https://api.github.com/users/ssvb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2015-04-17T03:16:13Z","updated_at":"2015-11-21T16:23:28Z","closed_at":"2015-08-07T21:41:09Z","body":"Executing the following snippet as Crystal code differs from Ruby:\r\n```rb\r\n   # Trying to implement https://code.google.com/codejam/contest/544101/dashboard\r\n\r\n   original = [\r\n     \"BB.\",\r\n     \"RBR\",\r\n     \"RBR\",\r\n   ]\r\n\r\n   transformed = original.map {|l|\r\n     new_l = l.chars.select {|ch| ch != '.' }\r\n #    if new_l.size < l.size\r\n      new_l = ['.'] + new_l while new_l.size < l.size\r\n #    end\r\n     new_l\r\n   }\r\n\r\n   transformed.each {|l| p l.join }\r\n```\r\n\r\nRuby result (correct):\r\n```\r\n\".BB\"\r\n\"RBR\"\r\n\"RBR\"\r\n```\r\n\r\nCrystal result (incorrect):\r\n```\r\n\".BB\"\r\n\".RBR\"\r\n\".RBR\"\r\n```\r\n\r\nReproducible with both Crystal 0.6.1 and the current git."},"comment":{"url":"https://api.github.com/repos/manastech/crystal/issues/comments/158659829","html_url":"https://github.com/manastech/crystal/issues/549#issuecomment-158659829","issue_url":"https://api.github.com/repos/manastech/crystal/issues/549","id":158659829,"user":{"login":"jhass","id":141294,"avatar_url":"https://avatars.githubusercontent.com/u/141294?v=3","gravatar_id":"","url":"https://api.github.com/users/jhass","html_url":"https://github.com/jhass","followers_url":"https://api.github.com/users/jhass/followers","following_url":"https://api.github.com/users/jhass/following{/other_user}","gists_url":"https://api.github.com/users/jhass/gists{/gist_id}","starred_url":"https://api.github.com/users/jhass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhass/subscriptions","organizations_url":"https://api.github.com/users/jhass/orgs","repos_url":"https://api.github.com/users/jhass/repos","events_url":"https://api.github.com/users/jhass/events{/privacy}","received_events_url":"https://api.github.com/users/jhass/received_events","type":"User","site_admin":false},"created_at":"2015-11-21T16:23:28Z","updated_at":"2015-11-21T16:23:28Z","body":"I don't remember anything ... "}}