lib/ident.rb in ident-0.0.1 vs lib/ident.rb in ident-0.0.2

- old
+ new

@@ -33,11 +33,13 @@ # the charset on the system, defaults to US-ASCII attr_reader :charset # the userid attr_reader :userid def initialize(os, userid) - @os, @charset = os.split('-') - @charset ||= 'US-ASCII' + parts = os.split('-') + @os = parts[0] + @charset = parts[1..-1].join('-') + @charset = 'US-ASCII' if @charset.empty? @userid = userid end end # This class gives access to the error returned by an identd. It