diff --git a/lib/net/imap.rb b/lib/net/imap.rb index bf24ba03..06d7bf25 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -2528,11 +2528,11 @@ def idle_done # Prints a warning and returns the mutable responses hash. # This is not thread-safe. # - # [+:frozen_dup+] + # [+:frozen_dup+ (planned default for +v0.6+)] # Returns a frozen copy of the unhandled responses hash, with frozen # array values. # - # [+:raise+ (planned future default)] + # [+:raise+] # Raise an +ArgumentError+ with the deprecation warning. # # For example: diff --git a/lib/net/imap/config.rb b/lib/net/imap/config.rb index 1ebced23..7532737c 100644 --- a/lib/net/imap/config.rb +++ b/lib/net/imap/config.rb @@ -260,7 +260,7 @@ def self.[](config) # Prints a warning and returns the mutable responses hash. # This is not thread-safe. # - # [+:frozen_dup+] + # [+:frozen_dup+ (planned default for +v0.6+)] # Returns a frozen copy of the unhandled responses hash, with frozen # array values. # @@ -269,7 +269,7 @@ def self.[](config) # # (+:frozen_dup+ config option was added in +v0.4.17+) # - # [+:raise+ (planned future default)] + # [+:raise+] # Raise an ArgumentError with the deprecation warning. # # Note: #responses_without_args is an alias for #responses_without_block. @@ -388,12 +388,11 @@ def defaults_hash version_defaults[0.5] = Config[:current] - version_defaults[0.6] = Config[0.5] - version_defaults[:next] = Config[0.6] - - version_defaults[:future] = Config[0.6].dup.update( - responses_without_block: :raise, + version_defaults[0.6] = Config[0.5].dup.update( + responses_without_block: :frozen_dup, ).freeze + version_defaults[:next] = Config[0.6] + version_defaults[:future] = Config[:next] version_defaults.freeze end diff --git a/test/net/imap/test_config.rb b/test/net/imap/test_config.rb index 6c709735..fa11c74a 100644 --- a/test/net/imap/test_config.rb +++ b/test/net/imap/test_config.rb @@ -190,7 +190,7 @@ class ConfigTest < Test::Unit::TestCase assert_same Config.default, Config.new(Config.default).parent assert_same Config.global, Config.new(Config.global).parent assert_same Config[0.4], Config.new(0.4).parent - assert_same Config[0.5], Config.new(:next).parent + assert_same Config[0.6], Config.new(:next).parent assert_equal true, Config.new({debug: true}, debug: false).parent.debug? assert_equal true, Config.new({debug: true}, debug: false).parent.frozen? end