[rb] revert optimization I suggested for
@@ -211,9 +211,15 @@ module Selenium
end
def generate_as_json(value, camelize_keys: true)
- camelize_keys = false if value == 'pref'
+ if value.is_a?(Hash)
+ value.each_with_object({}) do |(key, val), hash|
+ key = convert_json_key(key, camelize: camelize_keys)
+ hash[key] = generate_as_json(val, camelize_keys: key != 'prefs')
+ end
+ else
super
end
+ end
end # Options
end # Chrome
end # WebDriver
