Skip to content

Commit

Permalink
Fix 1.8.7 compatibility with splat operator
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Mar 4, 2012
1 parent 7c399c6 commit 5489901
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/whois/record/parser/whois.nic.uk.rb
Expand Up @@ -111,7 +111,13 @@ class WhoisNicUk < Base

property_supported :registrant_contacts do
if content_for_scanner =~ /Registrant's address:\n((.+\n)+)\n/
*address, city, state, zip, country = *$1.split("\n").map(&:strip)
lines = $1.split("\n").map(&:strip)
address = lines[0..-5]
city = lines[-4]
state = lines[-3]
zip = lines[-2]
country = lines[-1]

Record::Contact.new(
:type => Record::Contact::TYPE_REGISTRANT,
:name => content_for_scanner[/Registrant:\n\s*(.+)\n/, 1],
Expand Down

0 comments on commit 5489901

Please sign in to comment.