{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/5777","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/5777/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/5777/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/5777/events","html_url":"https://github.com/ManageIQ/manageiq/pull/5777","id":121352353,"number":5777,"title":"Use String#freeze to allocate a single string","user":{"login":"jrafanie","id":19339,"avatar_url":"https://avatars.githubusercontent.com/u/19339?v=3","gravatar_id":"","url":"https://api.github.com/users/jrafanie","html_url":"https://github.com/jrafanie","followers_url":"https://api.github.com/users/jrafanie/followers","following_url":"https://api.github.com/users/jrafanie/following{/other_user}","gists_url":"https://api.github.com/users/jrafanie/gists{/gist_id}","starred_url":"https://api.github.com/users/jrafanie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrafanie/subscriptions","organizations_url":"https://api.github.com/users/jrafanie/orgs","repos_url":"https://api.github.com/users/jrafanie/repos","events_url":"https://api.github.com/users/jrafanie/events{/privacy}","received_events_url":"https://api.github.com/users/jrafanie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/core","name":"core","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-09T22:12:53Z","updated_at":"2015-12-09T22:36:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/5777","html_url":"https://github.com/ManageIQ/manageiq/pull/5777","diff_url":"https://github.com/ManageIQ/manageiq/pull/5777.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/5777.patch"},"body":"Upstream psych uses a constant to avoid creating so many strings.\r\nWe can use freeze in our codebase since we use ruby 2.2+\r\n\r\nFixes: Already initialized constant Psych::Visitors::ToRuby::SHOVEL\r\nFixes #5772 \r\n\r\nBefore / after\r\n```\r\n$ bundle exec rails r ''\r\n\r\n/Users/joerafaniello/Code/manageiq/gems/pending/util/extensions/miq-yaml.rb:11: warning: already initialized constant Psych::Visitors::ToRuby::SHOVEL\r\n/Users/joerafaniello/.gem/ruby/2.2.3/gems/psych-2.0.16/lib/psych/visitors/to_ruby.rb:333: warning: previous definition of SHOVEL was here\r\n\r\n$ bundle exec rails r ''\r\n```"},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/163423134","html_url":"https://github.com/ManageIQ/manageiq/pull/5777#issuecomment-163423134","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/5777","id":163423134,"user":{"login":"djberg96","id":78529,"avatar_url":"https://avatars.githubusercontent.com/u/78529?v=3","gravatar_id":"","url":"https://api.github.com/users/djberg96","html_url":"https://github.com/djberg96","followers_url":"https://api.github.com/users/djberg96/followers","following_url":"https://api.github.com/users/djberg96/following{/other_user}","gists_url":"https://api.github.com/users/djberg96/gists{/gist_id}","starred_url":"https://api.github.com/users/djberg96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djberg96/subscriptions","organizations_url":"https://api.github.com/users/djberg96/orgs","repos_url":"https://api.github.com/users/djberg96/repos","events_url":"https://api.github.com/users/djberg96/events{/privacy}","received_events_url":"https://api.github.com/users/djberg96/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T22:36:52Z","updated_at":"2015-12-09T22:36:52Z","body":"Does freezing a string actually help performance on an equality check? How many times is this called anyway? Not an objection, just curious.\r\n\r\nAnyway, looks good to me."}}