lib/rack/webconsole.rb in rack-webconsole-pry-0.1.6 vs lib/rack/webconsole.rb in rack-webconsole-pry-0.1.7
- old
+ new
@@ -49,10 +49,12 @@
# Sets key code used to start web console.
#
# @param [String] value key code used at keypress event to start web console.
def key_code=(value)
- value = value.to_s unless value.is_a?(String)
+ value = [value] unless value.kind_of?(Array)
+ value.map! {|v| v.to_i }
+ value = MultiJson::encode(value)
@@config[:key_code] = value
end
end
# Honor the Rack contract by saving the passed Rack application in an ivar.