Skip to content

Commit

Permalink
Ditched unneeded parens.
Browse files Browse the repository at this point in the history
  • Loading branch information
sporkmonger committed Mar 19, 2009
1 parent 4628618 commit 178bf50
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions lib/addressable/idna.rb
Expand Up @@ -152,34 +152,34 @@ def self.unicode_compose_pair(ch_one, ch_two)

p = []
ucs4_to_utf8 = lambda do |ch|
# FIXME: Potential for BUS error?!?!
# For some reason, rcov likes to drop BUS errors here.
if ch < 128
p << ch
elsif ch < 2048
p << ((ch >> 6) | 192)
p << ((ch & 63) | 128)
p << (ch >> 6 | 192)
p << (ch & 63 | 128)
elsif ch < 0x10000
p << ((ch >> 12) | 224)
p << (((ch >> 6) & 63) | 128)
p << ((ch & 63) | 128)
p << (ch >> 12 | 224)
p << (ch >> 6 & 63 | 128)
p << (ch & 63 | 128)
elsif ch < 0x200000
p << ((ch >> 18) | 240)
p << (((ch >> 12) & 63) | 128)
p << (((ch >> 6) & 63) | 128)
p << ((ch & 63) | 128)
p << (ch >> 18 | 240)
p << (ch >> 12 & 63 | 128)
p << (ch >> 6 & 63 | 128)
p << (ch & 63 | 128)
elsif ch < 0x4000000
p << ((ch >> 24) | 248)
p << (((ch >> 18) & 63) | 128)
p << (((ch >> 12) & 63) | 128)
p << (((ch >> 6) & 63) | 128)
p << ((ch & 63) | 128)
p << (ch >> 24 | 248)
p << (ch >> 18 & 63 | 128)
p << (ch >> 12 & 63 | 128)
p << (ch >> 6 & 63 | 128)
p << (ch & 63 | 128)
elsif ch < 0x80000000
p << ((ch >> 30) | 252)
p << (((ch >> 24) & 63) | 128)
p << (((ch >> 18) & 63) | 128)
p << (((ch >> 12) & 63) | 128)
p << (((ch >> 6) & 63) | 128)
p << ((ch & 63) | 128)
p << (ch >> 30 | 252)
p << (ch >> 24 & 63 | 128)
p << (ch >> 18 & 63 | 128)
p << (ch >> 12 & 63 | 128)
p << (ch >> 6 & 63 | 128)
p << (ch & 63 | 128)
end
end

Expand Down

0 comments on commit 178bf50

Please sign in to comment.