Ruby: how to add “# encoding: UTF-8” automatically?

前端 未结 6 1027
时光说笑
时光说笑 2020-12-05 00:21

Is there any gem which adds # encoding: UTF-8 to each Ruby file automatically?

Or is there any other way to prevent from the invalid multibyte cha

6条回答
  •  既然无缘
    2020-12-05 00:59

    Upgrade to Ruby 2.0, as it makes UTF-8 the default encoding, removing the need for magic comments.

提交回复
热议问题