about summary refs log tree commit homepage
path: root/lib/mogilefs/mysql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mogilefs/mysql.rb')
-rw-r--r--lib/mogilefs/mysql.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mogilefs/mysql.rb b/lib/mogilefs/mysql.rb
index e2a16e5..81b2a61 100644
--- a/lib/mogilefs/mysql.rb
+++ b/lib/mogilefs/mysql.rb
@@ -28,7 +28,7 @@ class MogileFS::Mysql
   ##
   # Lists keys starting with +prefix+ follwing +after+ up to +limit+.  If
   # +after+ is nil the list starts at the beginning.
-  def _list_keys(domain, prefix = '', after = '', limit = 1000)
+  def _list_keys(domain, prefix = ''.freeze, after = ''.freeze, limit = 1000)
     # this code is based on server/lib/MogileFS/Worker/Query.pm
     dmid = get_dmid(domain)
 
@@ -43,7 +43,7 @@ class MogileFS::Mysql
     end
 
     raise MogileFS::Backend::InvalidCharsError if /[%\\]/ =~ prefix
-    prefix.gsub!(/_/, '\_') # not sure why MogileFS::Worker::Query does this...
+    prefix.gsub!(/_/, '\_'.freeze)
 
     sql = <<-EOS
     SELECT dkey,length,devcount FROM file
@@ -150,7 +150,7 @@ class MogileFS::Mysql
         tmp[devid.to_i] = {
           :hostip => hostip.freeze,
           :altip => (altip || hostip).freeze,
-          :readable => (host_status == "alive" &&
+          :readable => (host_status == "alive".freeze &&
                         DEV_STATUS_READABLE.include?(dev_status)),
           :http_port => http_port,
           :http_get_port => http_get_port ?  http_get_port.to_i : http_port,