Permalink
Browse files

[commont] util.rb: larger_than_oneline の invalid byte sequence 対策

  • Loading branch information...
1 parent baf8575 commit 2db4fa768a4dbf5bc7e6a4704bbc616f362a3499 @ongaeshi committed Sep 22, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/milkode/common/util.rb
View
6 lib/milkode/common/util.rb
@@ -89,7 +89,11 @@ def filename_to_utf8(str_from_file)
end
def larger_than_oneline(content)
- content && content.count($/) > 1
+ begin
+ content && content.count($/) > 1
+ rescue ArgumentError
+ true
+ end
end
def normalize_filename(str)

0 comments on commit 2db4fa7

Please sign in to comment.