Skip to content

Commit

Permalink
can't use "&." in ruby 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
markevans committed May 16, 2021
1 parent bcbe125 commit 300eb05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/dragonfly/image_magick/generators/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ def call(content, string, opts = {})

# Padding
pt, pr, pb, pl = parse_padding_string(opts["padding"]) if opts["padding"]
padding_top = (opts["padding_top"]&.to_i || pt || 0)
padding_right = (opts["padding_right"]&.to_i || pr || 0)
padding_bottom = (opts["padding_bottom"]&.to_i || pb || 0)
padding_left = (opts["padding_left"]&.to_i || pl || 0)
padding_top = (opts["padding_top"] || pt).to_i
padding_right = (opts["padding_right"] || pr).to_i
padding_bottom = (opts["padding_bottom"] || pb).to_i
padding_left = (opts["padding_left"] || pl).to_i

Commands.generate(content, args.join(" "), format)

Expand Down

0 comments on commit 300eb05

Please sign in to comment.