lib/net/dns/rr/mr.rb in net-dns-0.9.0 vs lib/net/dns/rr/mr.rb in net-dns-0.20.0

- old
+ new

@@ -21,14 +21,12 @@ end private def subclass_new_from_hash(options) - if options.key?(:newname) - @newname = check_name(options[:newname]) - else - raise ArgumentError, ":newname field is mandatory" - end + raise ArgumentError, ":newname field is mandatory" unless options.key?(:newname) + + @newname = check_name(options[:newname]) end def subclass_new_from_string(str) @newname = check_name(str) end