diff --git a/script/check-approval b/script/check-approval index 5312766..4574c2d 100755 --- a/script/check-approval +++ b/script/check-approval @@ -11,7 +11,7 @@ require 'colored' require 'fuzzy_match' # Display usage instructions -puts File.open(__FILE__).read.scan(/^# .*/)[0...3].join("\n").gsub(/^# /, '') if ARGV.count != 1 +puts File.read(__FILE__).scan(/^# .*/)[0...3].join("\n").gsub(/^# /, '') if ARGV.count != 1 class TrueClass def to_s diff --git a/spec/license_bom_spec.rb b/spec/license_bom_spec.rb index b1c282b..384c604 100644 --- a/spec/license_bom_spec.rb +++ b/spec/license_bom_spec.rb @@ -6,7 +6,7 @@ describe 'byte order marks' do Dir["#{licenses_path}/*.txt"].each do |file| context "the #{File.basename(file, '.txt')} license" do it 'does not begin with a byte order mark' do - bom = File.open(file).read.start_with?("\u0000EF\u0000BB\u0000BF") + bom = File.read(file).start_with?("\u0000EF\u0000BB\u0000BF") msg = 'License file begins with a Byte Order Mark. See https://stackoverflow.com/a/1068700.' expect(bom).to eql(false), msg end