diff --git a/lib/rqrcode/core_ext/array.rb b/lib/rqrcode/core_ext/array.rb index 84ac7964..c0ea8a90 100644 --- a/lib/rqrcode/core_ext/array.rb +++ b/lib/rqrcode/core_ext/array.rb @@ -1,5 +1,5 @@ require 'rqrcode/core_ext/array/behavior' class Array #:nodoc: - include CoreExtensions::Array::Behavior + include RQRCode::CoreExtensions::Array::Behavior end diff --git a/lib/rqrcode/core_ext/array/behavior.rb b/lib/rqrcode/core_ext/array/behavior.rb index d8f008a9..981e39c4 100644 --- a/lib/rqrcode/core_ext/array/behavior.rb +++ b/lib/rqrcode/core_ext/array/behavior.rb @@ -1,9 +1,12 @@ -module CoreExtensions #:nodoc: - module Array #:nodoc: - module Behavior - def extract_options! - last.is_a?(::Hash) ? pop : {} +module RQRCode + module CoreExtensions #:nodoc: + module Array #:nodoc: + module Behavior + def extract_options! + last.is_a?(::Hash) ? pop : {} + end unless [].respond_to?(:extract_options!) end end end end + diff --git a/lib/rqrcode/core_ext/integer.rb b/lib/rqrcode/core_ext/integer.rb index 1b12f1c0..acd37490 100644 --- a/lib/rqrcode/core_ext/integer.rb +++ b/lib/rqrcode/core_ext/integer.rb @@ -1,5 +1,5 @@ require 'rqrcode/core_ext/integer/bitwise' class Integer #:nodoc: - include CoreExtensions::Integer::Bitwise + include RQRCode::CoreExtensions::Integer::Bitwise end diff --git a/lib/rqrcode/core_ext/integer/bitwise.rb b/lib/rqrcode/core_ext/integer/bitwise.rb index 249e11b7..bb5fadcd 100644 --- a/lib/rqrcode/core_ext/integer/bitwise.rb +++ b/lib/rqrcode/core_ext/integer/bitwise.rb @@ -1,9 +1,11 @@ -module CoreExtensions #:nodoc: - module Integer #:nodoc: - module Bitwise - def rszf(count) - # zero fill right shift - (self >> count) & ((2 ** ((self.size * 8) - count))-1) +module RQRCode + module CoreExtensions #:nodoc: + module Integer #:nodoc: + module Bitwise + def rszf(count) + # zero fill right shift + (self >> count) & ((2 ** ((self.size * 8) - count))-1) + end end end end