Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Windows で Ruby に r\n の代わりに \n のみを使用するように指示することは可能ですか? ファイルが \r\n で保存され、正しく機能しないという問題が発生しています。これを修正するために変更できる設定はどこかにありますか?
単純な攻撃:
File.open("foo.txt", "w") do |fd| fd.write "this\nis\a\test\n" end
そして、これをhexeditで開くと:
00000000 74 68 69 73 0A 69 73 0A 61 0A 74 65 73 74 0A ^^ ^^ ^^ ^^ \n \n \n \n