mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Put source encoding comment as line for (j)ruby 1.9 compatibility (#3255)
In jruby 1.7.22 (1.9.3p551 compatibility mode), UTF-8 encoding is not properly detected, because the encoding comment is not on the first line as required in ruby 1.9. The frozen_string_literal magic comment did not come into existence until ruby 2.3, and ruby 1.9 does not look past the first line for magic comments. This results encoding-related syntax errors. Examples: SyntaxError: /home/nilbus/ws/rental_express/ROOT/rails/vendor/bundle/jruby/1.9/gems/sidekiq-4.2.6/lib/sidekiq.rb:52: Invalid char `\235' ('') in expression def self.â¨â¯Â°â¡Â°â©â¯ï¸µâ»ââ» ^ SyntaxError: /home/nilbus/ws/rental_express/ROOT/rails/vendor/bundle/jruby/1.9/gems/sidekiq-4.2.6/lib/sidekiq/api.rb:269: Invalid char `\237' ('') in expression alias_method :ð£, :clear ^ This patch should restore compatibility with ruby 1.9 and greater.
This commit is contained in:
parent
1e37c199e8
commit
2f9258e4fe
8 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
# encoding: utf-8
|
||||
# frozen_string_literal: true
|
||||
require 'sidekiq/version'
|
||||
fail "Sidekiq #{Sidekiq::VERSION} does not support Ruby versions below 2.0.0." if RUBY_PLATFORM != 'java' && RUBY_VERSION < '2.0.0'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
# encoding: utf-8
|
||||
# frozen_string_literal: true
|
||||
require 'sidekiq'
|
||||
|
||||
module Sidekiq
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
# encoding: utf-8
|
||||
# frozen_string_literal: true
|
||||
$stdout.sync = true
|
||||
|
||||
require 'yaml'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
# encoding: utf-8
|
||||
# frozen_string_literal: true
|
||||
require 'sidekiq/manager'
|
||||
require 'sidekiq/fetch'
|
||||
require 'sidekiq/scheduled'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
# encoding: utf-8
|
||||
# frozen_string_literal: true
|
||||
require 'sidekiq/util'
|
||||
require 'sidekiq/processor'
|
||||
require 'sidekiq/fetch'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
# encoding: utf-8
|
||||
# frozen_string_literal: true
|
||||
require_relative 'helper'
|
||||
require 'sidekiq/scheduled'
|
||||
require 'sidekiq/middleware/server/retry_jobs'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
# encoding: utf-8
|
||||
# frozen_string_literal: true
|
||||
require_relative 'helper'
|
||||
|
||||
class TestSidekiq < Sidekiq::Test
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
# encoding: utf-8
|
||||
# frozen_string_literal: true
|
||||
require_relative 'helper'
|
||||
require 'sidekiq/web'
|
||||
require 'rack/test'
|
||||
|
|
Loading…
Reference in a new issue