diff --git a/lib/rbmysql.rb b/lib/rbmysql.rb index a1dd24a94b..95c33017d3 100644 --- a/lib/rbmysql.rb +++ b/lib/rbmysql.rb @@ -12,13 +12,13 @@ require "uri" # p c1, c2 # end # end -class Mysql +class RbMysql dir = File.dirname __FILE__ - require "#{dir}/mysql/constants" - require "#{dir}/mysql/error" - require "#{dir}/mysql/charset" - require "#{dir}/mysql/protocol" + require "#{dir}/rbmysql/constants" + require "#{dir}/rbmysql/error" + require "#{dir}/rbmysql/charset" + require "#{dir}/rbmysql/protocol" VERSION = 30001 # Version number of this library MYSQL_UNIX_PORT = "/tmp/mysql.sock" # UNIX domain socket filename @@ -616,7 +616,7 @@ class Mysql else unsigned = f.flags & Field::UNSIGNED_FLAG != 0 v = Protocol.net2value(data, f.type, unsigned) - if v.is_a? Numeric or v.is_a? Mysql::Time + if v.is_a? Numeric or v.is_a? RbMysql::Time v elsif f.type == Field::TYPE_BIT or f.flags & Field::BINARY_FLAG != 0 Charset.to_binary(v) @@ -742,7 +742,7 @@ class Mysql alias sec second def ==(other) - other.is_a?(Mysql::Time) && + other.is_a?(RbMysql::Time) && @year == other.year && @month == other.month && @day == other.day && @hour == other.hour && @minute == other.minute && @second == other.second && @neg == neg && @second_part == other.second_part @@ -764,3 +764,4 @@ class Mysql end end + diff --git a/lib/mysql/README b/lib/rbmysql/README similarity index 100% rename from lib/mysql/README rename to lib/rbmysql/README diff --git a/lib/mysql/charset.rb b/lib/rbmysql/charset.rb similarity index 100% rename from lib/mysql/charset.rb rename to lib/rbmysql/charset.rb diff --git a/lib/mysql/compat.rb b/lib/rbmysql/compat.rb similarity index 100% rename from lib/mysql/compat.rb rename to lib/rbmysql/compat.rb diff --git a/lib/mysql/constants.rb b/lib/rbmysql/constants.rb similarity index 100% rename from lib/mysql/constants.rb rename to lib/rbmysql/constants.rb diff --git a/lib/mysql/error.rb b/lib/rbmysql/error.rb similarity index 100% rename from lib/mysql/error.rb rename to lib/rbmysql/error.rb diff --git a/lib/mysql/protocol.rb b/lib/rbmysql/protocol.rb similarity index 100% rename from lib/mysql/protocol.rb rename to lib/rbmysql/protocol.rb