Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

Kurt Stephens's latest activity

Thursday, February 17 2011
6436 LOCALHOST: 127.x.x.x is Class A, not Class C was updated in Ruby on Rails
  • Kurt Stephens
    Kurt Stephens commented at 12:21 AM

    The IPv6 portion of the regexp may also be in error.

Tuesday, February 15 2011
6436 LOCALHOST: 127.x.x.x is Class A, not Class C was updated in Ruby on Rails
  • Kurt Stephens
    Kurt Stephens commented at 9:47 PM

    A naive search yields other potential errors/problems:

    actionpack-3.0.3/lib/action_dispatch/http/request.rb:170:    TRUSTED_PROXIES = /^127\.0\.0\.1$|^(10|172\...
  • Kurt Stephens
    Kurt Stephens created the ticket at 9:10 PM

    actionpack-3.0.3/lib/action_dispatch/http/request.rb:

        LOCALHOST = [/^127\.0\.0\.\d{1,3}$/, "::1", /^0:0:0:0:0:0:0:1(%.*)?$/].freeze
    

    All IPv4 127.x.x.x add...

Tuesday, March 09 2010
1837 PostgresSQLAdapter#unescape_bytea does not handle "\\" was updated in Ruby on Rails
  • Kurt Stephens
    Kurt Stephens commented at 6:39 AM

    Unless I'm completely mistaken -- The E'' prefix has nothing to do with this bug. The E'' prefix is the extended escape sequence that Postgresql-8.3 (and up) su...

Thursday, May 07 2009
2549 memoize fails to handle default parameter = false was updated in Ruby on Rails
  • Kurt Stephens
    Kurt Stephens commented at 8:32 AM

    To fix this for your calling sequence would require removal of the "reload" magic. IMO, the reload magic is a really bad API idea, but it would require everyone...

  • Kurt Stephens
    Kurt Stephens commented at 8:05 AM

    This is why:

                def #{symbol}(*args)                                                   #   def mime_type(*args)
                  #{memoized_ivar} ||= {} ...
  • Kurt Stephens
    Kurt Stephens commented at 6:34 AM

    The elements in args are not protected from side-effects either so something like:

      a = [ 1, 2 ]
      puts memoized_method(a)
      a[0] = 5
      puts memoized_method(a...
  • Kurt Stephens
    Kurt Stephens commented at 6:29 AM

    There also a problem if method being memoized is named "memoized". :) The "memoized" local variable in the code template should be gensym'ed.

  • Kurt Stephens
    Kurt Stephens commented at 6:28 AM

    Also, should:

    memoized = @_memoized_#{symbol} || ::ActiveSupport::ConcurrentHash.new
    

    be:

    memoized = (@_memoized_#{symbol} ||= ::ActiveSupport::ConcurrentHash...
1 earlier change…
  • Kurt Stephens
    Kurt Stephens commented at 6:26 AM

    Here's fix for activesupport/lib/active_support/memoizable.rb:

    module ActiveSupport
      module SafelyMemoizable
        def safely_memoize(*symbols)
          symbols.ea...