public
Created

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
MRI 1.8.7-p371
 
>> $KCODE
=> "NONE"
>> "s.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/i
=> 0
>> $KCODE = 'UTF8'
=> "UTF8"
>> "s.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/i
=> 0
 
MRI 1.9.3-p327, Rubinius f76d3f67, JRuby 1.7.1 (1.9.3)
 
>> "s.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/i
=> nil
>> "t.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/i
=> 0
>> "s.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/
=> 0
 
Rubinius f76d3f67, JRuby 1.7.1 (1.8.7)
 
>> $KCODE
=> "NONE"
>> "s.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/i
=> 0
>> $KCODE = 'UTF8'
=> "UTF8"
>> "s.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/i
=> nil
>> "t.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/i
=> 0
>> "s.net" =~ /\A[^\W_]+([-.][^\W_]+)*\.[a-z]{2,6}\.?\Z/
=> 0

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.