1. 26 9月, 2016 14 次提交
  2. 25 9月, 2016 4 次提交
  3. 24 9月, 2016 14 次提交
  4. 23 9月, 2016 4 次提交
  5. 22 9月, 2016 2 次提交
    • K
      Fix memoization bug on ActionDispatch::TestRequest#request_method= · 7e350c67
      Kir Shatrov 提交于
      TestRequest have been overrriding request_method setter since 2009,
      but the actual implementation in Request (not TestRequest) has been
      changed since that. Now it's also using @request_method instance
      variable to keep the state.
      
      The override in TestRequest have not been calling `super`, which caused
      a bug that after accessing #requst_method the value was memoized and
      then we've never been able to change it anymore:
      
      ```
      req = ActionDispatch::TestRequest.create
      puts "was: #{req.request_method}" # memoized here
      req.request_method = "POST"
      puts "became: #{req.request_method}"
      ```
      
      output:
      
      ```
      was: GET
      became: GET
      ```
      
      Since the whole purpose of overriding the setter in TestRequest is to
      upcase it, I'm changing it to `super(method.to_s.upcase)`
      7e350c67
    • R
      Merge pull request #26524 from y-yagi/add_check_of_argument · bf19c223
      Richard Schneeman 提交于
      add check of argument
      bf19c223
  6. 21 9月, 2016 2 次提交