Uploaded image for project: 'TorqueBox'
  1. TorqueBox
  2. TORQUE-1173

Session store is not fully compatible with the ruby Hash API

    Details

      Description

      As can be seen here:
      https://github.com/torquebox/torquebox/blob/master/gems/web/lib/torquebox/session/servlet_store.rb#L137

      the fetch method is aliased to the [] method which in turn isn't compatible with the ruby Hash API. We've used specifically the second parameter to fetch to provide a sensible default if the key is not set, aliasing fetch to [] means it no longer takes this second parameter.

      The method signature for fetch looks like this:

      fetch(key [, default] )
      or
      fetch(key)

      {| key | block }

      You can either supply just the key to fetch or the key and a default if no key or a block which would be called if no key present.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                benbrowning Ben Browning
                Reporter:
                johnae John Axel Eriksson
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: