Skip to content

Commit

Permalink
Initialize @pattern, @conditions variables, when creating Namespace m…
Browse files Browse the repository at this point in the history
…odule to avoid warnings.
  • Loading branch information
vipulnsward committed Apr 6, 2014
1 parent 1fab37a commit e377c4e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sinatra-contrib/lib/sinatra/namespace.rb
Expand Up @@ -116,6 +116,8 @@ module Sinatra
module Namespace
def self.new(base, pattern, conditions = {}, &block)
Module.new do
#quelch uninitialized variable warnings, since these get used by compile method.
@pattern, @conditions = nil, nil
extend NamespacedMethods
include InstanceMethods
@base, @extensions, @errors = base, [], {}
Expand Down

0 comments on commit e377c4e

Please sign in to comment.