Hello community, here is the log from the commit of package yast2-ruby-bindings for openSUSE:Factory checked in at 2017-07-17 10:31:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-ruby-bindings (Old) and /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ruby-bindings" Mon Jul 17 10:31:11 2017 rev:83 rq:509729 version:3.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-ruby-bindings/yast2-ruby-bindings.changes 2017-07-11 08:34:00.438366586 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes 2017-07-17 10:31:11.543387809 +0200 @@ -1,0 +2,17 @@ +Wed Jul 12 09:33:56 UTC 2017 - jreidin...@suse.com + +- Always use ::Integer to avoid collision with Yast::Integer + (bsc#1044312) +- make Builtins.toupper/tolower strictly backward compatible + in ruby 2.4 (bsc#1044312) +- 3.3.1 + +------------------------------------------------------------------- +Wed Jul 12 07:11:35 UTC 2017 - jreidin...@suse.com + +- replace all Fixnum and Bignum with Integer as ruby 2.4 make it + deprecated ( ruby2.4 will be default for TW and SLE15 so part + of bsc#1044312) +- 3.3.0 + +------------------------------------------------------------------- Old: ---- yast2-ruby-bindings-3.2.14.tar.bz2 New: ---- yast2-ruby-bindings-3.3.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-ruby-bindings.spec ++++++ --- /var/tmp/diff_new_pack.AJfChy/_old 2017-07-17 10:31:12.055315636 +0200 +++ /var/tmp/diff_new_pack.AJfChy/_new 2017-07-17 10:31:12.063314508 +0200 @@ -17,7 +17,7 @@ Name: yast2-ruby-bindings -Version: 3.2.14 +Version: 3.3.1 Release: 0 Url: https://github.com/yast/yast-ruby-bindings BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-ruby-bindings-3.2.14.tar.bz2 -> yast2-ruby-bindings-3.3.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.2.14/package/yast2-ruby-bindings.changes new/yast2-ruby-bindings-3.3.1/package/yast2-ruby-bindings.changes --- old/yast2-ruby-bindings-3.2.14/package/yast2-ruby-bindings.changes 2017-07-04 14:12:56.404420105 +0200 +++ new/yast2-ruby-bindings-3.3.1/package/yast2-ruby-bindings.changes 2017-07-12 12:37:50.551622597 +0200 @@ -1,4 +1,21 @@ ------------------------------------------------------------------- +Wed Jul 12 09:33:56 UTC 2017 - jreidin...@suse.com + +- Always use ::Integer to avoid collision with Yast::Integer + (bsc#1044312) +- make Builtins.toupper/tolower strictly backward compatible + in ruby 2.4 (bsc#1044312) +- 3.3.1 + +------------------------------------------------------------------- +Wed Jul 12 07:11:35 UTC 2017 - jreidin...@suse.com + +- replace all Fixnum and Bignum with Integer as ruby 2.4 make it + deprecated ( ruby2.4 will be default for TW and SLE15 so part + of bsc#1044312) +- 3.3.0 + +------------------------------------------------------------------- Tue Jul 4 09:50:48 UTC 2017 - jreidin...@suse.com - Set proper title also for YaST2 System Log (bsc#1046153) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.2.14/package/yast2-ruby-bindings.spec new/yast2-ruby-bindings-3.3.1/package/yast2-ruby-bindings.spec --- old/yast2-ruby-bindings-3.2.14/package/yast2-ruby-bindings.spec 2017-07-04 14:12:56.404420105 +0200 +++ new/yast2-ruby-bindings-3.3.1/package/yast2-ruby-bindings.spec 2017-07-12 12:37:50.551622597 +0200 @@ -17,7 +17,7 @@ Name: yast2-ruby-bindings -Version: 3.2.14 +Version: 3.3.1 Url: https://github.com/yast/yast-ruby-bindings Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.2.14/src/ruby/yast/builtins.rb new/yast2-ruby-bindings-3.3.1/src/ruby/yast/builtins.rb --- old/yast2-ruby-bindings-3.2.14/src/ruby/yast/builtins.rb 2017-07-04 14:12:56.456420105 +0200 +++ new/yast2-ruby-bindings-3.3.1/src/ruby/yast/builtins.rb 2017-07-12 12:37:50.555622597 +0200 @@ -325,7 +325,7 @@ end object.scanf("%d").first # use full qualified ::Float to avoid clash with Yast::Builtins::Float - when ::Float, ::Fixnum, ::Bignum + when ::Float, ::Integer object.to_i end # else nil @@ -653,7 +653,7 @@ # @private used only internal for frame shifting def self.shift_frame_number(args) - if args.first.is_a? ::Fixnum + if args.first.is_a? ::Integer args[0] += 1 if args[0] >= 0 else args.unshift 1 @@ -897,7 +897,7 @@ # Converts an integer to a hexadecimal string. # - tohexstring(<int>) # - tohexstring(<int>, <int>width) - # @deprecated use {::Fixnum#to_s} with base 16 instead but note that there is slight differences + # @deprecated use {::Integer#to_s} with base 16 instead but note that there is slight differences def self.tohexstring(int, width = 0) return nil if int.nil? || width.nil? @@ -929,7 +929,9 @@ # @deprecated use {::String#downcase} instead def self.tolower(string) return nil if string.nil? - string.downcase + # cannot use String#downcase as it from ruby 2.4 convert also non-ascii so keep backward + # compatible + string.tr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz") end # Converts a value to a string in ycp. @@ -950,8 +952,7 @@ when ::NilClass then "nil" when ::TrueClass then "true" when ::FalseClass then "false" - when ::Fixnum, - ::Bignum, + when ::Integer, ::Float, Yast::Term, Yast::Path, @@ -987,7 +988,9 @@ # @deprecated use {::String#upcase} instead def self.toupper(string) return nil if string.nil? - string.upcase + # cannot use String#upcase as it from ruby 2.4 convert also non-ascii so keep backward + # compatible + string.tr("abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ") end ########################################################### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.2.14/src/ruby/yast/convert.rb new/yast2-ruby-bindings-3.3.1/src/ruby/yast/convert.rb --- old/yast2-ruby-bindings-3.2.14/src/ruby/yast/convert.rb 2017-07-04 14:12:56.460420105 +0200 +++ new/yast2-ruby-bindings-3.3.1/src/ruby/yast/convert.rb 2017-07-12 12:37:50.555622597 +0200 @@ -66,7 +66,7 @@ return object if from == "any" && allowed_type(object, to) if to == "float" - return nil unless (object.is_a? Fixnum) || (object.is_a? Bignum) + return nil unless object.is_a?(::Integer) return object.to_f elsif to == "integer" return nil unless object.is_a? Float diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.2.14/src/ruby/yast/debugger.rb new/yast2-ruby-bindings-3.3.1/src/ruby/yast/debugger.rb --- old/yast2-ruby-bindings-3.2.14/src/ruby/yast/debugger.rb 2017-07-04 14:12:56.464420105 +0200 +++ new/yast2-ruby-bindings-3.3.1/src/ruby/yast/debugger.rb 2017-07-12 12:37:50.555622597 +0200 @@ -16,7 +16,7 @@ # the debugger! Use only in a trusted network as this is actually # a backdoor to the system! For secure connection use SSH and start # the debugger locally after connecting via SSH. - # @param [Fixnum] port the port number where the debugger server will + # @param [Integer] port the port number where the debugger server will # listen to # @param [Boolean] start_client autostart the debugger client # (ignored in remote debugging) @@ -124,7 +124,7 @@ # starts the debugger server and waits for a client connection # @param [Boolean] remote if set to true the server is accesible from network - # @param [Fixnum] port the port number used by the server + # @param [Integer] port the port number used by the server # @param [Boolean] delay add extra delay after starting the server def start_server(remote, port, delay: false) Byebug.wait_connection = true @@ -136,7 +136,7 @@ end # starts a debugger session in xterm - # @param [Fixnum] port the port number to connect to + # @param [Integer] port the port number to connect to def start_gui_session(port) job = fork do # wait until the main thread starts the debugger and opens the port @@ -158,7 +158,7 @@ # the running debugger # @param [Boolean] remote boolean flag indicating whether the debugger # can be accessed remotely - # @param [Fixnum] port the port number used by the debugger + # @param [Integer] port the port number used by the debugger # @return [String] text def debugger_message(remote, port) if remote @@ -183,7 +183,7 @@ # construct a debugger command displayed to user in a popup # @param [String,nil] host the machine host name or IP address, nil if # the debugger can be accessed only locally - # @param [Fixnum] port the port number used by the debugger + # @param [Integer] port the port number used by the debugger # @return [String] byebug command label def debugger_cmd(host, port) host_param = host ? "#{host}:" : "" @@ -191,7 +191,7 @@ end # is the target port open? - # @param [Fixnum] port the port number + # @param [Integer] port the port number # @return [Boolean] true if the port is open, false otherwise def port_open?(port) require "socket" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.2.14/src/ruby/yast/logger.rb new/yast2-ruby-bindings-3.3.1/src/ruby/yast/logger.rb --- old/yast2-ruby-bindings-3.2.14/src/ruby/yast/logger.rb 2017-07-04 14:12:56.476420105 +0200 +++ new/yast2-ruby-bindings-3.3.1/src/ruby/yast/logger.rb 2017-07-12 12:37:50.555622597 +0200 @@ -7,7 +7,7 @@ caller_frame = 1 backtrace = false - if args.first.is_a? Fixnum + if args.first.is_a?(::Integer) if args.first < 0 backtrace = true args.shift diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.2.14/src/ruby/yast/ops.rb new/yast2-ruby-bindings-3.3.1/src/ruby/yast/ops.rb --- old/yast2-ruby-bindings-3.2.14/src/ruby/yast/ops.rb 2017-07-04 14:12:56.484420105 +0200 +++ new/yast2-ruby-bindings-3.3.1/src/ruby/yast/ops.rb 2017-07-12 12:37:50.555622597 +0200 @@ -18,7 +18,7 @@ "boolean" => [::TrueClass, ::FalseClass], "string" => ::String, "symbol" => ::Symbol, - "integer" => [::Fixnum, ::Bignum], + "integer" => ::Integer, "float" => ::Float, "list" => ::Array, "map" => ::Hash, @@ -120,7 +120,7 @@ indexes.each do |i| case res when ::Array, Yast::Term - if i.is_a? Fixnum + if i.is_a?(::Integer) if (0..res.size - 1).cover? i res = res[i] else @@ -196,7 +196,7 @@ indexes.each do |i| case res when ::Array, Yast::Term - if !i.is_a?(Fixnum) + if !i.is_a?(::Integer) Yast.y2warning OUTER_LOOP_FRAME, "Passed #{i.inspect} as index key for array." return end @@ -492,8 +492,7 @@ @localized = localized end # ordered classes from low priority to high - # Only tricky part is Fixnum/Bignum, which is in fact same, so it has special handling in code - CLASS_ORDER = [::NilClass, ::FalseClass, ::TrueClass, ::Fixnum, ::Bignum, ::Float, + CLASS_ORDER = [::NilClass, ::FalseClass, ::TrueClass, ::Integer, ::Float, ::String, Yast::Path, ::Symbol, ::Array, Yast::Term, ::Hash].freeze def <=>(other) if @value.class == other.class @@ -512,7 +511,11 @@ else return @value <=> other if @value.is_a?(::Numeric) && other.is_a?(::Numeric) - CLASS_ORDER.index(@value.class) <=> CLASS_ORDER.index(other.class) + # workaround for older ruby versions which have value.is_a?(Integer) but value.class => Fixnum + # No longer problem with ruby 2.4 + order = CLASS_ORDER.index(@value.class) || CLASS_ORDER.index(::Integer) + other_order = CLASS_ORDER.index(other.class) || CLASS_ORDER.index(::Integer) + order <=> other_order end end end