diff options
7 files changed, 12 insertions, 12 deletions
diff --git a/actionview/test/template/test_case_test.rb b/actionview/test/template/test_case_test.rb index 5697ffa317..5ad1938b61 100644 --- a/actionview/test/template/test_case_test.rb +++ b/actionview/test/template/test_case_test.rb @@ -155,7 +155,7 @@ module ActionView test "view_assigns excludes internal ivars" do INTERNAL_IVARS.each do |ivar| assert defined?(ivar), "expected #{ivar} to be defined" - assert !view_assigns.keys.include?(ivar.to_s.sub('@', '').to_sym), "expected #{ivar} to be excluded from view_assigns" + assert !view_assigns.keys.include?(ivar.to_s.tr('@', '').to_sym), "expected #{ivar} to be excluded from view_assigns" end end end diff --git a/activejob/lib/active_job/queue_adapters.rb b/activejob/lib/active_job/queue_adapters.rb index e865c901ce..efbcd3cb3a 100644 --- a/activejob/lib/active_job/queue_adapters.rb +++ b/activejob/lib/active_job/queue_adapters.rb @@ -7,7 +7,7 @@ module ActiveJob # * {Delayed Job}[https://github.com/collectiveidea/delayed_job] # * {Qu}[https://github.com/bkeepers/qu] # * {Que}[https://github.com/chanks/que] - # * {QueueClassic 2.x}[https://github.com/ryandotsmith/queue_classic/tree/v2.2.3] + # * {queue_classic}[https://github.com/QueueClassic/queue_classic] # * {Resque 1.x}[https://github.com/resque/resque/tree/1-x-stable] # * {Sidekiq}[http://sidekiq.org] # * {Sneakers}[https://github.com/jondot/sneakers] @@ -20,7 +20,7 @@ module ActiveJob # | Backburner | Yes | Yes | Yes | Yes | Job | Global | # | Delayed Job | Yes | Yes | Yes | Job | Global | Global | # | Que | Yes | Yes | Yes | Job | No | Job | - # | Queue Classic | Yes | Yes | No* | No | No | No | + # | queue_classic | Yes | Yes | No* | No | No | No | # | Resque | Yes | Yes | Yes (Gem) | Queue | Global | Yes | # | Sidekiq | Yes | Yes | Yes | Queue | No | Job | # | Sneakers | Yes | Yes | No | Queue | Queue | No | @@ -29,7 +29,7 @@ module ActiveJob # | Active Job | Yes | Yes | Yes | No | No | No | # # NOTE: - # Queue Classic does not support Job scheduling. However you can implement this + # queue_classic does not support Job scheduling. However you can implement this # yourself or you can use the queue_classic-later gem. See the documentation for # ActiveJob::QueueAdapters::QueueClassicAdapter. # diff --git a/activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb b/activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb index f160932578..1a46f20420 100644 --- a/activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb +++ b/activejob/lib/active_job/queue_adapters/queue_classic_adapter.rb @@ -2,7 +2,7 @@ require 'queue_classic' module ActiveJob module QueueAdapters - # == Queue Classic adapter for Active Job + # == queue_classic adapter for Active Job # # queue_classic provides a simple interface to a PostgreSQL-backed message # queue. queue_classic specializes in concurrent locking and minimizing @@ -11,9 +11,9 @@ module ActiveJob # production environment and that adding another dependency (e.g. redis, # beanstalkd, 0mq) is undesirable. # - # Read more about Queue Classic {here}[https://github.com/ryandotsmith/queue_classic]. + # Read more about queue_classic {here}[https://github.com/QueueClassic/queue_classic]. # - # To use Queue Classic set the queue_adapter config to +:queue_classic+. + # To use queue_classic set the queue_adapter config to +:queue_classic+. # # Rails.application.config.active_job.queue_adapter = :queue_classic class QueueClassicAdapter @@ -25,7 +25,7 @@ module ActiveJob def enqueue_at(job, timestamp) #:nodoc: queue = build_queue(job.queue_name) unless queue.respond_to?(:enqueue_at) - raise NotImplementedError, 'To be able to schedule jobs with Queue Classic ' \ + raise NotImplementedError, 'To be able to schedule jobs with queue_classic ' \ 'the QC::Queue needs to respond to `enqueue_at(timestamp, method, *args)`. ' 'You can implement this yourself or you can use the queue_classic-later gem.' end diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 210151a2ad..6bdb53ac5a 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -213,7 +213,7 @@ *Kenn Ejima* -* Add support for Postgresql JSONB. +* Add support for PostgreSQL JSONB. Example: diff --git a/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb b/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb index 34a555dfd4..815e8eb97f 100644 --- a/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb +++ b/activerecord/lib/active_record/associations/builder/has_and_belongs_to_many.rb @@ -11,7 +11,7 @@ module ActiveRecord::Associations::Builder end def join_table - @join_table ||= [@lhs_class.table_name, klass.table_name].sort.join("\0").gsub(/^(.*[._])(.+)\0\1(.+)/, '\1\2_\3').gsub("\0", "_") + @join_table ||= [@lhs_class.table_name, klass.table_name].sort.join("\0").gsub(/^(.*[._])(.+)\0\1(.+)/, '\1\2_\3').tr("\0", "_") end private diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index 171a6f4391..48e82d28d9 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -63,7 +63,7 @@ module ActiveRecord # records, artists => artists_records # music_artists, music_records => music_artists_records def self.derive_join_table_name(first_table, second_table) # :nodoc: - [first_table.to_s, second_table.to_s].sort.join("\0").gsub(/^(.*_)(.+)\0\1(.+)/, '\1\2_\3').gsub("\0", "_") + [first_table.to_s, second_table.to_s].sort.join("\0").gsub(/^(.*_)(.+)\0\1(.+)/, '\1\2_\3').tr("\0", "_") end module ClassMethods diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 49dfee96ec..55533a5d40 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -184,7 +184,7 @@ module ActiveSupport } UTC_OFFSET_WITH_COLON = '%s%02d:%02d' - UTC_OFFSET_WITHOUT_COLON = UTC_OFFSET_WITH_COLON.sub(':', '') + UTC_OFFSET_WITHOUT_COLON = UTC_OFFSET_WITH_COLON.tr(':', '') @lazy_zones_map = ThreadSafe::Cache.new |