diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2016-12-08 13:51:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-08 13:51:02 -0500 |
commit | a0aad0381a35aebab31f5a7318c2a1644f86bbea (patch) | |
tree | 70773050fdd04c192559ba610d87edc497350459 | |
parent | ef76f83f4cf0f27e84c0c5f4a3ff426d7ad84d9d (diff) | |
parent | 2495a0ba33832d20e3eadc163999dd40123e10c1 (diff) | |
download | rails-a0aad0381a35aebab31f5a7318c2a1644f86bbea.tar.gz rails-a0aad0381a35aebab31f5a7318c2a1644f86bbea.tar.bz2 rails-a0aad0381a35aebab31f5a7318c2a1644f86bbea.zip |
Merge pull request #25051 from bf4/extract_notes_as_binary
Extract notes as binary
-rw-r--r-- | railties/lib/rails/source_annotation_extractor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/source_annotation_extractor.rb b/railties/lib/rails/source_annotation_extractor.rb index 967e969f81..3a48c4c496 100644 --- a/railties/lib/rails/source_annotation_extractor.rb +++ b/railties/lib/rails/source_annotation_extractor.rb @@ -116,7 +116,7 @@ class SourceAnnotationExtractor # Otherwise it returns an empty hash. def extract_annotations_from(file, pattern) lineno = 0 - result = File.readlines(file).inject([]) do |list, line| + result = File.readlines(file, encoding: Encoding::BINARY).inject([]) do |list, line| lineno += 1 next list unless line =~ pattern list << Annotation.new(lineno, $1, $2) |