{"action":"created","issue":{"url":"https://api.github.com/repos/Shopify/liquid/issues/519","labels_url":"https://api.github.com/repos/Shopify/liquid/issues/519/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/liquid/issues/519/comments","events_url":"https://api.github.com/repos/Shopify/liquid/issues/519/events","html_url":"https://github.com/Shopify/liquid/pull/519","id":56420059,"number":519,"title":"Allow filters to redefine Object methods to make them invokable.","user":{"login":"dylanahsmith","id":954402,"avatar_url":"https://avatars.githubusercontent.com/u/954402?v=3","gravatar_id":"","url":"https://api.github.com/users/dylanahsmith","html_url":"https://github.com/dylanahsmith","followers_url":"https://api.github.com/users/dylanahsmith/followers","following_url":"https://api.github.com/users/dylanahsmith/following{/other_user}","gists_url":"https://api.github.com/users/dylanahsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanahsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanahsmith/subscriptions","organizations_url":"https://api.github.com/users/dylanahsmith/orgs","repos_url":"https://api.github.com/users/dylanahsmith/repos","events_url":"https://api.github.com/users/dylanahsmith/events{/privacy}","received_events_url":"https://api.github.com/users/dylanahsmith/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-03T18:54:24Z","updated_at":"2015-02-04T23:19:23Z","closed_at":"2015-02-04T23:07:51Z","pull_request":{"url":"https://api.github.com/repos/Shopify/liquid/pulls/519","html_url":"https://github.com/Shopify/liquid/pull/519","diff_url":"https://github.com/Shopify/liquid/pull/519.diff","patch_url":"https://github.com/Shopify/liquid/pull/519.patch"},"body":"@arthurnn & @fw42 for review\r\ncc @nickpearson\r\nFixes #518\r\n\r\n## Problem\r\n\r\nStrainer has been using Strainer.instance_methods as a blacklist of methods that couldn't be called.  This means that object like `.to_json` which rails declares on Object can't be used, which is a good default.  However, this blacklist also prevented a filter from having a custom `to_json` that is intended to be exposed.\r\n\r\n## Solution\r\n\r\nAn empty module doesn't have any instance methods predefined on it, unlike a class, so we don't need to filter these methods with a blacklist.  However, I still needed to refactor the Strainer class so that there was a each set of filters had their own whitelist of methods that can be called.\r\n\r\nI also simplified the code so that there is only one place where filters are added, which also means that `Liquid::Context#add_filter` now uses the strainer class cache."},"comment":{"url":"https://api.github.com/repos/Shopify/liquid/issues/comments/72961687","html_url":"https://github.com/Shopify/liquid/pull/519#issuecomment-72961687","issue_url":"https://api.github.com/repos/Shopify/liquid/issues/519","id":72961687,"user":{"login":"fw42","id":2072686,"avatar_url":"https://avatars.githubusercontent.com/u/2072686?v=3","gravatar_id":"","url":"https://api.github.com/users/fw42","html_url":"https://github.com/fw42","followers_url":"https://api.github.com/users/fw42/followers","following_url":"https://api.github.com/users/fw42/following{/other_user}","gists_url":"https://api.github.com/users/fw42/gists{/gist_id}","starred_url":"https://api.github.com/users/fw42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fw42/subscriptions","organizations_url":"https://api.github.com/users/fw42/orgs","repos_url":"https://api.github.com/users/fw42/repos","events_url":"https://api.github.com/users/fw42/events{/privacy}","received_events_url":"https://api.github.com/users/fw42/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T23:19:23Z","updated_at":"2015-02-04T23:19:23Z","body":"sweet. can you release a new version?"}}