Hello community,

here is the log from the commit of package rubygem-activesupport-4_2 for 
openSUSE:Factory checked in at 2017-09-26 21:13:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-activesupport-4_2 (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-activesupport-4_2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-activesupport-4_2"

Tue Sep 26 21:13:12 2017 rev:13 rq:514919 version:4.2.9

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-activesupport-4_2/rubygem-activesupport-4_2.changes
      2017-03-21 22:50:23.375653443 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-activesupport-4_2.new/rubygem-activesupport-4_2.changes
 2017-09-26 21:13:27.618513273 +0200
@@ -1,0 +2,41 @@
+Thu Aug  3 19:01:48 UTC 2017 - [email protected]
+
+- updated to version 4.2.9
+ see installed CHANGELOG.md
+
+  ## Rails 4.2.9 (June 26, 2017) ##
+  
+  *   Fixed bug in `DateAndTime::Compatibility#to_time` that caused it to
+      raise `RuntimeError: can't modify frozen Time` when called on any frozen 
`Time`.
+      Properly pass through the frozen `Time` or `ActiveSupport::TimeWithZone` 
object
+      when calling `#to_time`.
+  
+      *Kevin McPhillips* & *Andrew White*
+  
+  *   Restore the return type of `DateTime#utc`
+  
+      In Rails 5.0 the return type of `DateTime#utc` was changed to `Time` to 
be
+      consistent with the new `DateTime#localtime` method. When these changes 
were
+      backported in #27553 this inadvertently changed the return type in a 
patcn
+      release. Since `DateTime#localtime` was new in Rails 4.2.8 it's okay to
+      restore the return type of `DateTime#utc` but keep `DateTime#localtime` 
as
+      returning `Time` without breaking backwards compatibility.
+  
+      *Andrew White*
+  
+  *   In Core Extensions, make `MarshalWithAutoloading#load` pass through the 
second, optional
+      argument for `Marshal#load( source [, proc] )`. This way we don't have 
to do
+      `Marshal.method(:load).super_method.call(sourse, proc)` just to be able 
to pass a proc.
+  
+      *Jeff Latz*
+  
+  *   Cache `ActiveSupport::TimeWithZone#to_datetime` before freezing.
+  
+      *Adam Rice*
+  
+  *   `AS::Testing::TimeHelpers#travel_to` now changes `DateTime.now` as well 
as
+      `Time.now` and `Date.today`.
+  
+      *Yuki Nishijima*
+
+-------------------------------------------------------------------

Old:
----
  activesupport-4.2.8.gem

New:
----
  activesupport-4.2.9.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-activesupport-4_2.spec ++++++
--- /var/tmp/diff_new_pack.E2ddL2/_old  2017-09-26 21:13:28.222428352 +0200
+++ /var/tmp/diff_new_pack.E2ddL2/_new  2017-09-26 21:13:28.222428352 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-activesupport-4_2
-Version:        4.2.8
+Version:        4.2.9
 Release:        0
 %define mod_name activesupport
 %define mod_full_name %{mod_name}-%{version}

++++++ activesupport-4.2.8.gem -> activesupport-4.2.9.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2017-02-21 17:06:59.000000000 +0100
+++ new/CHANGELOG.md    2017-06-26 23:29:03.000000000 +0200
@@ -1,3 +1,39 @@
+## Rails 4.2.9 (June 26, 2017) ##
+
+*   Fixed bug in `DateAndTime::Compatibility#to_time` that caused it to
+    raise `RuntimeError: can't modify frozen Time` when called on any frozen 
`Time`.
+    Properly pass through the frozen `Time` or `ActiveSupport::TimeWithZone` 
object
+    when calling `#to_time`.
+
+    *Kevin McPhillips* & *Andrew White*
+
+*   Restore the return type of `DateTime#utc`
+
+    In Rails 5.0 the return type of `DateTime#utc` was changed to `Time` to be
+    consistent with the new `DateTime#localtime` method. When these changes 
were
+    backported in #27553 this inadvertently changed the return type in a patcn
+    release. Since `DateTime#localtime` was new in Rails 4.2.8 it's okay to
+    restore the return type of `DateTime#utc` but keep `DateTime#localtime` as
+    returning `Time` without breaking backwards compatibility.
+
+    *Andrew White*
+
+*   In Core Extensions, make `MarshalWithAutoloading#load` pass through the 
second, optional
+    argument for `Marshal#load( source [, proc] )`. This way we don't have to 
do
+    `Marshal.method(:load).super_method.call(sourse, proc)` just to be able to 
pass a proc.
+
+    *Jeff Latz*
+
+*   Cache `ActiveSupport::TimeWithZone#to_datetime` before freezing.
+
+    *Adam Rice*
+
+*   `AS::Testing::TimeHelpers#travel_to` now changes `DateTime.now` as well as
+    `Time.now` and `Date.today`.
+
+    *Yuki Nishijima*
+
+
 ## Rails 4.2.8 (February 21, 2017) ##
 
 *   Make `getlocal` and `getutc` always return instances of `Time` for
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_support/core_ext/date_and_time/compatibility.rb 
new/lib/active_support/core_ext/date_and_time/compatibility.rb
--- old/lib/active_support/core_ext/date_and_time/compatibility.rb      
2017-02-21 17:06:59.000000000 +0100
+++ new/lib/active_support/core_ext/date_and_time/compatibility.rb      
2017-06-26 23:29:03.000000000 +0200
@@ -11,19 +11,5 @@
     # this behavior, but new apps will have an initializer that sets
     # this to true, because the new behavior is preferred.
     mattr_accessor(:preserve_timezone, instance_writer: false) { false }
-
-    def self.included(base)
-      base.class_eval do
-        remove_possible_method :to_time
-
-        def to_time
-          if preserve_timezone
-            @_to_time_with_instance_offset ||= getlocal(utc_offset)
-          else
-            @_to_time_with_system_offset ||= getlocal
-          end
-        end
-      end
-    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_support/core_ext/date_time/calculations.rb 
new/lib/active_support/core_ext/date_time/calculations.rb
--- old/lib/active_support/core_ext/date_time/calculations.rb   2017-02-21 
17:06:59.000000000 +0100
+++ new/lib/active_support/core_ext/date_time/calculations.rb   2017-06-26 
23:29:03.000000000 +0200
@@ -157,17 +157,12 @@
   end
   alias_method :getlocal, :localtime
 
-  # Returns a <tt>Time</tt> instance of the simultaneous time in the UTC 
timezone.
+  # Returns a <tt>DateTime</tt> instance of the simultaneous time in the UTC 
timezone.
   #
   #   DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24))     # => Mon, 
21 Feb 2005 10:11:12 -0600
   #   DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 
21 Feb 2005 16:11:12 UTC
   def utc
-    utc = new_offset(0)
-
-    Time.utc(
-      utc.year, utc.month, utc.day,
-      utc.hour, utc.min, utc.sec + utc.sec_fraction
-    )
+    new_offset(0)
   end
   alias_method :getgm, :utc
   alias_method :getutc, :utc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/active_support/core_ext/date_time/compatibility.rb 
new/lib/active_support/core_ext/date_time/compatibility.rb
--- old/lib/active_support/core_ext/date_time/compatibility.rb  2017-02-21 
17:06:59.000000000 +0100
+++ new/lib/active_support/core_ext/date_time/compatibility.rb  2017-06-26 
23:29:03.000000000 +0200
@@ -2,4 +2,14 @@
 
 class DateTime
   include DateAndTime::Compatibility
+
+  remove_possible_method :to_time
+
+  # Either return an instance of `Time` with the same UTC offset
+  # as +self+ or an instance of `Time` representing the same time
+  # in the the local system timezone depending on the setting of
+  # on the setting of +ActiveSupport.to_time_preserves_timezone+.
+  def to_time
+    preserve_timezone ? getlocal(utc_offset) : getlocal
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/core_ext/marshal.rb 
new/lib/active_support/core_ext/marshal.rb
--- old/lib/active_support/core_ext/marshal.rb  2017-02-21 17:06:59.000000000 
+0100
+++ new/lib/active_support/core_ext/marshal.rb  2017-06-26 23:29:03.000000000 
+0200
@@ -2,8 +2,8 @@
 
 module Marshal
   class << self
-    def load_with_autoloading(source)
-      load_without_autoloading(source)
+    def load_with_autoloading(source, proc = nil)
+      load_without_autoloading(source, proc)
     rescue ArgumentError, NameError => exc
       if exc.message.match(%r|undefined class/module (.+?)(::)?\z|)
         # try loading the class/module
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/core_ext/time/calculations.rb 
new/lib/active_support/core_ext/time/calculations.rb
--- old/lib/active_support/core_ext/time/calculations.rb        2017-02-21 
17:06:59.000000000 +0100
+++ new/lib/active_support/core_ext/time/calculations.rb        2017-06-26 
23:29:03.000000000 +0200
@@ -257,7 +257,9 @@
   # can be chronologically compared with a Time
   def compare_with_coercion(other)
     # we're avoiding Time#to_datetime cause it's expensive
-    if other.is_a?(Time)
+    if other.class == Time
+      compare_without_coercion(other)
+    elsif other.is_a?(Time)
       compare_without_coercion(other.to_time)
     else
       to_datetime <=> other
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/core_ext/time/compatibility.rb 
new/lib/active_support/core_ext/time/compatibility.rb
--- old/lib/active_support/core_ext/time/compatibility.rb       2017-02-21 
17:06:59.000000000 +0100
+++ new/lib/active_support/core_ext/time/compatibility.rb       2017-06-26 
23:29:03.000000000 +0200
@@ -1,5 +1,14 @@
-require 'active_support/core_ext/date_and_time/compatibility'
+require "active_support/core_ext/date_and_time/compatibility"
+require "active_support/core_ext/module/remove_method"
 
 class Time
   include DateAndTime::Compatibility
+
+  remove_possible_method :to_time
+
+  # Either return +self+ or the time in the local system timezone depending
+  # on the setting of +ActiveSupport.to_time_preserves_timezone+.
+  def to_time
+    preserve_timezone ? self : getlocal
+  end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/gem_version.rb 
new/lib/active_support/gem_version.rb
--- old/lib/active_support/gem_version.rb       2017-02-21 17:06:59.000000000 
+0100
+++ new/lib/active_support/gem_version.rb       2017-06-26 23:29:03.000000000 
+0200
@@ -7,7 +7,7 @@
   module VERSION
     MAJOR = 4
     MINOR = 2
-    TINY  = 8
+    TINY  = 9
     PRE   = nil
 
     STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/hash_with_indifferent_access.rb 
new/lib/active_support/hash_with_indifferent_access.rb
--- old/lib/active_support/hash_with_indifferent_access.rb      2017-02-21 
17:06:59.000000000 +0100
+++ new/lib/active_support/hash_with_indifferent_access.rb      2017-06-26 
23:29:03.000000000 +0200
@@ -250,6 +250,10 @@
       dup.tap { |hash| hash.transform_values!(*args, &block) }
     end
 
+    def compact
+      dup.tap(&:compact!)
+    end
+
     # Convert to a regular hash with string keys.
     def to_hash
       _new_hash = Hash.new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/logger.rb 
new/lib/active_support/logger.rb
--- old/lib/active_support/logger.rb    2017-02-21 17:06:59.000000000 +0100
+++ new/lib/active_support/logger.rb    2017-06-26 23:29:03.000000000 +0200
@@ -8,6 +8,17 @@
     include ActiveSupport::LoggerThreadSafeLevel
     include LoggerSilence
 
+    # Returns true if the logger destination matches one of the sources
+    #
+    #   logger = Logger.new(STDOUT)
+    #   ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT)
+    #   # => true
+    def self.logger_outputs_to?(logger, *sources)
+      logdev = logger.instance_variable_get("@logdev")
+      logger_source = logdev.dev if logdev.respond_to?(:dev)
+      sources.any? { |source| source == logger_source }
+    end
+
     # Broadcasts logs to multiple loggers.
     def self.broadcast(logger) # :nodoc:
       Module.new do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/testing/time_helpers.rb 
new/lib/active_support/testing/time_helpers.rb
--- old/lib/active_support/testing/time_helpers.rb      2017-02-21 
17:06:59.000000000 +0100
+++ new/lib/active_support/testing/time_helpers.rb      2017-06-26 
23:29:03.000000000 +0200
@@ -42,12 +42,13 @@
     # Containing helpers that helps you test passage of time.
     module TimeHelpers
       # Changes current time to the time in the future or in the past by a 
given time difference by
-      # stubbing +Time.now+ and +Date.today+.
+      # stubbing +Time.now+, +Date.today+, and +DateTime.now+.
       #
-      #   Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
+      #   Time.current     # => Sat, 09 Nov 2013 15:34:49 EST -05:00
       #   travel 1.day
-      #   Time.current # => Sun, 10 Nov 2013 15:34:49 EST -05:00
-      #   Date.current # => Sun, 10 Nov 2013
+      #   Time.current     # => Sun, 10 Nov 2013 15:34:49 EST -05:00
+      #   Date.current     # => Sun, 10 Nov 2013
+      #   DateTime.current # => Sun, 10 Nov 2013 15:34:49 -0500
       #
       # This method also accepts a block, which will return the current time 
back to its original
       # state at the end of the block:
@@ -61,13 +62,14 @@
         travel_to Time.now + duration, &block
       end
 
-      # Changes current time to the given time by stubbing +Time.now+ and
-      # +Date.today+ to return the time or date passed into this method.
+      # Changes current time to the given time by stubbing +Time.now+,
+      # +Date.today+, and +DateTime.now+ to return the time or date passed 
into this method.
       #
-      #   Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
+      #   Time.current     # => Sat, 09 Nov 2013 15:34:49 EST -05:00
       #   travel_to Time.new(2004, 11, 24, 01, 04, 44)
-      #   Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00
-      #   Date.current # => Wed, 24 Nov 2004
+      #   Time.current     # => Wed, 24 Nov 2004 01:04:44 EST -05:00
+      #   Date.current     # => Wed, 24 Nov 2004
+      #   DateTime.current # => Wed, 24 Nov 2004 01:04:44 -0500
       #
       # Dates are taken as their timestamp at the beginning of the day in the
       # application time zone. <tt>Time.current</tt> returns said timestamp,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/time_with_zone.rb 
new/lib/active_support/time_with_zone.rb
--- old/lib/active_support/time_with_zone.rb    2017-02-21 17:06:59.000000000 
+0100
+++ new/lib/active_support/time_with_zone.rb    2017-06-26 23:29:03.000000000 
+0200
@@ -326,6 +326,17 @@
       @to_datetime ||= utc.to_datetime.new_offset(Rational(utc_offset, 86_400))
     end
 
+    # Returns an instance of +Time+, either with the same UTC offset
+    # as +self+ or in the local system timezone depending on the setting
+    # of +ActiveSupport.to_time_preserves_timezone+.
+    def to_time
+      if preserve_timezone
+        @to_time_with_instance_offset ||= getlocal(utc_offset)
+      else
+        @to_time_with_system_offset ||= getlocal
+      end
+    end
+
     # So that +self+ <tt>acts_like?(:time)</tt>.
     def acts_like_time?
       true
@@ -338,7 +349,8 @@
     alias_method :kind_of?, :is_a?
 
     def freeze
-      period; utc; time # preload instance variables before freezing
+      # preload instance variables before freezing
+      period; utc; time; to_datetime; to_time
       super
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/xml_mini/libxml.rb 
new/lib/active_support/xml_mini/libxml.rb
--- old/lib/active_support/xml_mini/libxml.rb   2017-02-21 17:06:59.000000000 
+0100
+++ new/lib/active_support/xml_mini/libxml.rb   2017-06-26 23:29:03.000000000 
+0200
@@ -14,11 +14,9 @@
         data = StringIO.new(data || '')
       end
 
-      char = data.getc
-      if char.nil?
+      if data.eof?
         {}
       else
-        data.ungetc(char)
         LibXML::XML::Parser.io(data).parse.to_hash
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/xml_mini/libxmlsax.rb 
new/lib/active_support/xml_mini/libxmlsax.rb
--- old/lib/active_support/xml_mini/libxmlsax.rb        2017-02-21 
17:06:59.000000000 +0100
+++ new/lib/active_support/xml_mini/libxmlsax.rb        2017-06-26 
23:29:03.000000000 +0200
@@ -66,12 +66,9 @@
         data = StringIO.new(data || '')
       end
 
-      char = data.getc
-      if char.nil?
+      if data.eof?
         {}
       else
-        data.ungetc(char)
-
         LibXML::XML::Error.set_handler(&LibXML::XML::Error::QUIET_HANDLER)
         parser = LibXML::XML::SaxParser.io(data)
         document = self.document_class.new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/xml_mini/nokogiri.rb 
new/lib/active_support/xml_mini/nokogiri.rb
--- old/lib/active_support/xml_mini/nokogiri.rb 2017-02-21 17:06:59.000000000 
+0100
+++ new/lib/active_support/xml_mini/nokogiri.rb 2017-06-26 23:29:03.000000000 
+0200
@@ -19,11 +19,9 @@
         data = StringIO.new(data || '')
       end
 
-      char = data.getc
-      if char.nil?
+      if data.eof?
         {}
       else
-        data.ungetc(char)
         doc = Nokogiri::XML(data)
         raise doc.errors.first if doc.errors.length > 0
         doc.to_hash
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/active_support/xml_mini/nokogirisax.rb 
new/lib/active_support/xml_mini/nokogirisax.rb
--- old/lib/active_support/xml_mini/nokogirisax.rb      2017-02-21 
17:06:59.000000000 +0100
+++ new/lib/active_support/xml_mini/nokogirisax.rb      2017-06-26 
23:29:03.000000000 +0200
@@ -72,11 +72,9 @@
         data = StringIO.new(data || '')
       end
 
-      char = data.getc
-      if char.nil?
+      if data.eof?
         {}
       else
-        data.ungetc(char)
         document = self.document_class.new
         parser = Nokogiri::XML::SAX::Parser.new(document)
         parser.parse(data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-02-21 17:06:59.000000000 +0100
+++ new/metadata        2017-06-26 23:29:03.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: activesupport
 version: !ruby/object:Gem::Version
-  version: 4.2.8
+  version: 4.2.9
 platform: ruby
 authors:
 - David Heinemeier Hansson
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-02-21 00:00:00.000000000 Z
+date: 2017-06-26 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: i18n
@@ -323,7 +323,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.6.10
+rubygems_version: 2.6.12
 signing_key: 
 specification_version: 4
 summary: A toolkit of support libraries and Ruby core extensions extracted 
from the


Reply via email to