From: Eric Wong Date: 2015-10-05T04:59:04+00:00 Subject: [ruby-core:70982] limiting scope of magic comments like frozen_string_literal How about being able to limit the scope of magic comments like how the "use" / "no" pragmas work in Perl? So something like: def hello_world # frozen_string_literal: true puts 'Hello world' # frozen_string_literal: false foo = 'Hello' foo << ' world' end It would make refactoring to moving methods to different files/modules easier, I think.