From ce38a6b8b62e73596ec1062663e85726fbca8933 Mon Sep 17 00:00:00 2001 From: robertomiranda Date: Sun, 16 Mar 2014 14:32:08 -0500 Subject: Fix Shadowing extensions variable in Register Annotation Exentsions --- railties/lib/rails/source_annotation_extractor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/source_annotation_extractor.rb b/railties/lib/rails/source_annotation_extractor.rb index af6d90b5bd..201532d299 100644 --- a/railties/lib/rails/source_annotation_extractor.rb +++ b/railties/lib/rails/source_annotation_extractor.rb @@ -24,8 +24,8 @@ class SourceAnnotationExtractor # Registers new Annotations File Extensions # SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ } - def self.register_extensions(*extensions, &block) - self.extensions[/\.(#{extensions.join("|")})$/] = block + def self.register_extensions(*exts, &block) + extensions[/\.(#{exts.join("|")})$/] = block end register_extensions("builder", "rb", "rake", "yml", "yaml", "ruby") { |tag| /#\s*(#{tag}):?\s*(.*)$/ } -- cgit v1.2.3