Fix typos in lib/rbmysql/charset.rb

GSoC/Meterpreter_Web_Console
gazayas 2018-06-08 11:32:06 +09:00
parent 0107310c72
commit ac5be1fe1e
1 changed files with 3 additions and 3 deletions

View File

@ -164,7 +164,7 @@ class RbMysql
if defined? Encoding if defined? Encoding
# MySQL Charset -> Ruby's Encodeing # MySQL Charset -> Ruby's Encoding
CHARSET_ENCODING = { CHARSET_ENCODING = {
"armscii8" => nil, "armscii8" => nil,
"ascii" => Encoding::US_ASCII, "ascii" => Encoding::US_ASCII,
@ -208,7 +208,7 @@ class RbMysql
value.dup.force_encoding Encoding::ASCII_8BIT value.dup.force_encoding Encoding::ASCII_8BIT
end end
# retrun corresponding Ruby encoding # return corresponding Ruby encoding
# === Return # === Return
# encoding [Encoding] # encoding [Encoding]
def encoding def encoding
@ -217,7 +217,7 @@ class RbMysql
enc enc
end end
# convert encoding to corrensponding to MySQL charset # convert encoding corresponding to MySQL charset
def convert(value) def convert(value)
if value.is_a? String and value.encoding != Encoding::ASCII_8BIT if value.is_a? String and value.encoding != Encoding::ASCII_8BIT
value = value.encode encoding value = value.encode encoding