[DRE-commits] [ruby-commander] 05/11: New upstream version 4.4.3

Daisuke Higuchi dai at moszumanska.debian.org
Sat Oct 21 12:40:36 UTC 2017


This is an automated email from the git hooks/post-receive script.

dai pushed a commit to branch master
in repository ruby-commander.

commit 475c2a06ff49400d8be3ca52132accc08385edd9
Author: HIGUCHI Daisuke (VDR dai) <dai at debian.org>
Date:   Sat Oct 21 21:16:50 2017 +0900

    New upstream version 4.4.3
---
 .travis.yml                       | 6 ++++--
 History.rdoc                      | 4 ++++
 lib/commander/user_interaction.rb | 7 ++++---
 lib/commander/version.rb          | 2 +-
 4 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index eb94999..21e3a42 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,6 +5,8 @@ before_install:
 rvm:
   - 1.9.3
   - 2.0.0
-  - 2.1.0
-  - 2.2.0
+  - 2.1.10
+  - 2.2.6
+  - 2.3.3
+  - 2.4.0
   - jruby-19mode
diff --git a/History.rdoc b/History.rdoc
index 3323302..e79d722 100644
--- a/History.rdoc
+++ b/History.rdoc
@@ -1,3 +1,7 @@
+=== 4.4.3 / 2016-12-28
+
+* Fix deprecated constant warnings on Ruby 2.4.
+
 === 4.4.2 / 2016-12-20
 
 * Add `help_paging` program flag so that help paging may be disabled. (@gogiel)
diff --git a/lib/commander/user_interaction.rb b/lib/commander/user_interaction.rb
index 91bed1f..a14078e 100644
--- a/lib/commander/user_interaction.rb
+++ b/lib/commander/user_interaction.rb
@@ -324,13 +324,14 @@ module Commander
     # Implements ask_for_CLASS methods.
 
     module AskForClass
+      DEPRECATED_CONSTANTS = [:Config, :TimeoutError, :MissingSourceFile, :NIL, :TRUE, :FALSE, :Fixnum, :Bignum].freeze
       # All special cases in HighLine::Question#convert, except those that implement #parse
       (
         [Float, Integer, String, Symbol, Regexp, Array, File, Pathname] +
         # All Classes that respond to #parse
-        Object.constants.map do |const|
-          # Ignore constants that trigger deprecation warnings
-          Object.const_get(const) unless [:Config, :TimeoutError, :MissingSourceFile].include?(const)
+        # Ignore constants that trigger deprecation warnings
+        (Object.constants - DEPRECATED_CONSTANTS).map do |const|
+          Object.const_get(const)
         end.select do |const|
           const.class == Class && const.respond_to?(:parse)
         end
diff --git a/lib/commander/version.rb b/lib/commander/version.rb
index 1da2b93..620aae3 100644
--- a/lib/commander/version.rb
+++ b/lib/commander/version.rb
@@ -1,3 +1,3 @@
 module Commander
-  VERSION = '4.4.2'.freeze
+  VERSION = '4.4.3'.freeze
 end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-commander.git



More information about the Pkg-ruby-extras-commits mailing list