Skip to content

Instantly share code, notes, and snippets.

@woarewe
Created November 21, 2019 14:44
Show Gist options
  • Save woarewe/587411b9b39fd00920b54f75d4eae7d5 to your computer and use it in GitHub Desktop.
Save woarewe/587411b9b39fd00920b54f75d4eae7d5 to your computer and use it in GitHub Desktop.
Frozen string literal magic comment investigation
require_relative 'lib'
str = 'string'
p Str.call.equal?(str) # Try to predict result and than add # frozen_string_literal: true and run app.rb
# frozen_string_literal: true
class Str
def self.call
'string'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment