Skip to content

Commit

Permalink
fix "undefined method `=~' for false:FalseClass" on Ruby >= 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mxey committed Jul 15, 2024
1 parent 665f915 commit 5fb593f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/octocatalog-diff/catalog-diff/display/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,13 @@ def self.addition_only_no_truncation(depth, hash)

# Single line strings
hash.keys.sort.map do |key|
next if hash[key] =~ /\n/
next if hash[key].kind_of?(String) && hash[key] =~ /\n/
result << left_pad(2 * depth + 4, [key.inspect, ': ', hash[key].inspect].join('')).green
end

# Multi-line strings
hash.keys.sort.map do |key|
next if !hash[key].kind_of?(String)
next if hash[key] !~ /\n/
result << left_pad(2 * depth + 4, [key.inspect, ': >>>'].join('')).green
result.concat hash[key].split(/\n/).map(&:green)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@
'mode' => '0644',
'content' => 'x' * 150,
'owner' => 'root',
'group' => 'wheel'
'group' => 'wheel',
'force' => true,
}
}
]
Expand Down

0 comments on commit 5fb593f

Please sign in to comment.