File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99### Changes
1010
1111* Add JRuby 9.2 to the test matrix ([ #228 ] ( https://github.com/railsconfig/config/issues/228 ) )
12+ * Add exit! to reserved keywords ([ #289 ] ( https://github.com/railsconfig/config/issues/289 ) )
1213
1314## 2.2.1
1415
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ def merge!(hash)
145145 end
146146
147147 # Some keywords that don't play nicely with OpenStruct
148- SETTINGS_RESERVED_NAMES = %w[ select collect test count zip min max ] . freeze
148+ SETTINGS_RESERVED_NAMES = %w[ select collect test count zip min max exit! ] . freeze
149149
150150 # An alternative mechanism for property access.
151151 # This let's you do foo['bar'] along with foo.bar.
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ count: lemon
44zip : cherry
55max : kumquat
66min : fig
7+ exit! : taro
Original file line number Diff line number Diff line change 1414 expect ( config . zip ) . to eq ( 'cherry' )
1515 expect ( config . max ) . to eq ( 'kumquat' )
1616 expect ( config . min ) . to eq ( 'fig' )
17+ expect ( config . exit! ) . to eq ( 'taro' )
1718 end
1819
1920 it 'should allow to access them using [] operator' do
2324 expect ( config [ 'zip' ] ) . to eq ( 'cherry' )
2425 expect ( config [ 'max' ] ) . to eq ( 'kumquat' )
2526 expect ( config [ 'min' ] ) . to eq ( 'fig' )
27+ expect ( config [ 'exit!' ] ) . to eq ( 'taro' )
2628
2729 expect ( config [ :select ] ) . to eq ( 'apple' )
2830 expect ( config [ :collect ] ) . to eq ( 'banana' )
2931 expect ( config [ :count ] ) . to eq ( 'lemon' )
3032 expect ( config [ :zip ] ) . to eq ( 'cherry' )
3133 expect ( config [ :max ] ) . to eq ( 'kumquat' )
3234 expect ( config [ :min ] ) . to eq ( 'fig' )
35+ expect ( config [ :exit! ] ) . to eq ( 'taro' )
3336 end
3437 end
3538
You can’t perform that action at this time.
0 commit comments