Skip to content

Commit

Permalink
Fix incorrect documentation for initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
jkowens committed Oct 8, 2023
1 parent 9b6ba81 commit bfcbefb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/sinatra/indifferent_hash.rb
Expand Up @@ -21,15 +21,17 @@ module Sinatra
# writing interface (calling e.g. <tt>[]=</tt>, <tt>merge</tt>). This mapping
# belongs to the public interface. For example, given:
#
# hash = Sinatra::IndifferentHash.new(:a=>1)
# hash = Sinatra::IndifferentHash.new
# hash[:a] = 1
#
# You are guaranteed that the key is returned as a string:
#
# hash.keys # => ["a"]
#
# Technically other types of keys are accepted:
#
# hash = Sinatra::IndifferentHash.new(:a=>1)
# hash = Sinatra::IndifferentHash
# hash[:a] = 1
# hash[0] = 0
# hash # => { "a"=>1, 0=>0 }
#
Expand Down

0 comments on commit bfcbefb

Please sign in to comment.