Skip to content

Commit

Permalink
macho: 2.4.0 (#284)
Browse files Browse the repository at this point in the history
* rubocop, gemspec: Enforce Ruby >= 2.5

This is the earliest Ruby we test in CI.

* fat_file: RuboCop autocorrection

* macho: 2.4.0
  • Loading branch information
woodruffw committed Nov 6, 2020
1 parent a95996e commit 553ee7f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
@@ -1,4 +1,5 @@
AllCops:
TargetRubyVersion: 2.5
NewCops: enable

Style/StringLiterals:
Expand Down
2 changes: 1 addition & 1 deletion lib/macho.rb
Expand Up @@ -16,7 +16,7 @@
# The primary namespace for ruby-macho.
module MachO
# release version
VERSION = "2.3.0"
VERSION = "2.4.0"

# Opens the given filename as a MachOFile or FatFile, depending on its magic.
# @param filename [String] the file being opened
Expand Down
14 changes: 6 additions & 8 deletions lib/macho/fat_file.rb
Expand Up @@ -398,16 +398,14 @@ def each_macho(options = {})
errors = []

machos.each_with_index do |macho, index|
begin
yield macho
rescue RecoverableModificationError => e
e.macho_slice = index
yield macho
rescue RecoverableModificationError => e
e.macho_slice = index

# Strict mode: Immediately re-raise. Otherwise: Retain, check later.
raise e if strict
# Strict mode: Immediately re-raise. Otherwise: Retain, check later.
raise e if strict

errors << e
end
errors << e
end

# Non-strict mode: Raise first error if *all* Mach-O slices failed.
Expand Down
2 changes: 1 addition & 1 deletion ruby-macho.gemspec
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.authors = ["William Woodruff"]
s.email = "[email protected]"
s.files = Dir["LICENSE", "README.md", ".yardopts", "lib/**/*"]
s.required_ruby_version = ">= 2.3"
s.required_ruby_version = ">= 2.5"
s.homepage = "https://github.com/Homebrew/ruby-macho"
s.license = "MIT"
end

0 comments on commit 553ee7f

Please sign in to comment.