-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
# default_proc.rb
hash = Hash.new { |k| "default value" }
hash.default_proc = nil
Marshal.dump(hash)
$ jruby default_proc.rb
TypeError: can't dump hash with default proc
dump at org/jruby/RubyMarshal.java:102
<main> at default_proc.rb:3Running on jruby 9.1.6.0 (2.3.1) 2016-11-09 0150a76 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]
Expected Behavior
JRuby should be able to dump a hash that was initialized with default_proc that was later set to nil.
Actual Behavior
JRuby currently ignores default_proc set to nil and gives an error that a hash with default_proc cannot be dumped.
Reactions are currently unavailable