Skip to content

Commit 1574c5f

Browse files
committed
Fixing class << self vs. def self.<method> problems with string_to_binary and binary_to_string
1 parent ab0b47a commit 1574c5f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,11 @@ def self.string_to_time(value)
186186

187187
# These methods will only allow the adapter to insert binary data with a length of 7K or less
188188
# because of a SQL Server statement length policy.
189-
def self.string_to_binary(value)
189+
def string_to_binary(value)
190190
Base64.encode64(value)
191191
end
192192

193-
def self.binary_to_string(value)
193+
def binary_to_string(value)
194194
Base64.decode64(value)
195195
end
196196

@@ -200,8 +200,8 @@ def new_time(year, mon, mday, hour, min, sec, microsec = 0)
200200
return nil if year.nil? || year == 0
201201
Time.time_with_datetime_fallback(Base.default_timezone, year, mon, mday, hour, min, sec, microsec) rescue nil
202202
end
203-
end #class << self
204-
end #SQLServerColumn
203+
end #class << self
204+
end #SQLServerColumn
205205

206206
# In ADO mode, this adapter will ONLY work on Windows systems,
207207
# since it relies on Win32OLE, which, to my knowledge, is only

0 commit comments

Comments
 (0)