Skip to content

Commit

Permalink
Favor instance_of? over is_a?
Browse files Browse the repository at this point in the history
  • Loading branch information
janlelis committed Jan 4, 2023
1 parent 7784e9d commit 751823f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/unicode/display_width.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def self.of(string, ambiguous = 1, overwrite = {}, options = {})
else
width = INDEX
depth = INITIAL_DEPTH
while (width = width[codepoint / depth]).is_a? Array
while (width = width[codepoint / depth]).instance_of? Array
codepoint %= depth
depth /= 16
end
Expand Down

0 comments on commit 751823f

Please sign in to comment.