lib/telegram/bot/api.rb in telegram-bot-ruby-0.4.0 vs lib/telegram/bot/api.rb in telegram-bot-ruby-0.4.1

- old
+ new

@@ -67,10 +67,10 @@ return value unless REPLY_MARKUP_TYPES.include?(value.class) value.to_h.to_json end def jsonify_inline_query_results(value) - return value unless Array(value).all? { |i| INLINE_QUERY_RESULT_TYPES.include?(i.class) } + return value unless value.is_a?(Array) && value.all? { |i| INLINE_QUERY_RESULT_TYPES.include?(i.class) } value.map { |i| i.to_h.select { |_, v| v } }.to_json end def camelize(method_name) words = method_name.split('_')