Skip to content

Commit 553ee7f

Browse files
authored
macho: 2.4.0 (#284)
* rubocop, gemspec: Enforce Ruby >= 2.5 This is the earliest Ruby we test in CI. * fat_file: RuboCop autocorrection * macho: 2.4.0
1 parent a95996e commit 553ee7f

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

Diff for: .rubocop.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
AllCops:
2+
TargetRubyVersion: 2.5
23
NewCops: enable
34

45
Style/StringLiterals:

Diff for: lib/macho.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# The primary namespace for ruby-macho.
1717
module MachO
1818
# release version
19-
VERSION = "2.3.0"
19+
VERSION = "2.4.0"
2020

2121
# Opens the given filename as a MachOFile or FatFile, depending on its magic.
2222
# @param filename [String] the file being opened

Diff for: lib/macho/fat_file.rb

+6-8
Original file line numberDiff line numberDiff line change
@@ -398,16 +398,14 @@ def each_macho(options = {})
398398
errors = []
399399

400400
machos.each_with_index do |macho, index|
401-
begin
402-
yield macho
403-
rescue RecoverableModificationError => e
404-
e.macho_slice = index
401+
yield macho
402+
rescue RecoverableModificationError => e
403+
e.macho_slice = index
405404

406-
# Strict mode: Immediately re-raise. Otherwise: Retain, check later.
407-
raise e if strict
405+
# Strict mode: Immediately re-raise. Otherwise: Retain, check later.
406+
raise e if strict
408407

409-
errors << e
410-
end
408+
errors << e
411409
end
412410

413411
# Non-strict mode: Raise first error if *all* Mach-O slices failed.

Diff for: ruby-macho.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
1010
s.authors = ["William Woodruff"]
1111
s.email = "[email protected]"
1212
s.files = Dir["LICENSE", "README.md", ".yardopts", "lib/**/*"]
13-
s.required_ruby_version = ">= 2.3"
13+
s.required_ruby_version = ">= 2.5"
1414
s.homepage = "https://github.com/Homebrew/ruby-macho"
1515
s.license = "MIT"
1616
end

0 commit comments

Comments
 (0)