File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ def to_h
5858 @params
5959 end
6060
61+ def dup
62+ Section . new ( @params . dup , @corresponding_config_element . dup )
63+ end
64+
6165 def +( other )
6266 Section . new ( self . to_h . merge ( other . to_h ) )
6367 end
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ def stop
115115 private
116116
117117 def _http_server_overwrite_config ( config , opts )
118- conf = config
118+ conf = config . dup
119119 Fluent ::PluginHelper ::Server ::SERVER_TRANSPORT_PARAMS . map ( &:to_s ) . each do |param |
120120 if opts . key? ( param )
121121 conf [ param ] = opts [ param ]
Original file line number Diff line number Diff line change @@ -40,8 +40,6 @@ class TestSection < ::Test::Unit::TestCase
4040 assert_equal ( "email" , s1 . send )
4141 assert_equal ( "normal" , s1 . klass )
4242 assert_equal ( 5 , s1 . keys )
43-
44- assert_raise ( NoMethodError ) { s1 . dup }
4543 end
4644
4745 test 'creates object which contains specified hash object itself, including fields with at prefix' do
You can’t perform that action at this time.
0 commit comments