diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-13 15:16:25 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-13 15:16:25 -0700 |
commit | 4868692687f2904d2a02c1d6cd09882b6916cc5f (patch) | |
tree | 7c76897c944e5d02e2c0b34f02d7d01e404b8cdc /actionpack/test/journey/routes_test.rb | |
parent | 36f26fd47ecff07f229264560a68fca0d59911ca (diff) | |
download | rails-4868692687f2904d2a02c1d6cd09882b6916cc5f.tar.gz rails-4868692687f2904d2a02c1d6cd09882b6916cc5f.tar.bz2 rails-4868692687f2904d2a02c1d6cd09882b6916cc5f.zip |
pass anchor directly to `Pattern`
the caller already has it, there is no reason to pack it in to an object
and just throw that object away.
Diffstat (limited to 'actionpack/test/journey/routes_test.rb')
-rw-r--r-- | actionpack/test/journey/routes_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/journey/routes_test.rb b/actionpack/test/journey/routes_test.rb index b9dac8751c..c7555e68ee 100644 --- a/actionpack/test/journey/routes_test.rb +++ b/actionpack/test/journey/routes_test.rb @@ -10,7 +10,7 @@ module ActionDispatch def test_clear routes = Routes.new exp = Router::Strexp.build '/foo(/:id)', {}, ['/.?'] - path = Path::Pattern.new exp + path = Path::Pattern.new exp, true requirements = { :hello => /world/ } routes.add_route nil, path, requirements, [], {:id => nil}, {} @@ -52,7 +52,7 @@ module ActionDispatch strexp = Router::Strexp.build( "/hello/:who", { who: /\d/ }, ['/', '.', '?'] ) - path = Path::Pattern.new strexp + path = Path::Pattern.new strexp, true custom_route = @routes.add_route nil, path, {}, [], {}, {} assert_equal [custom_route], @routes.custom_routes |