Skip to content

Commit

Permalink
Default Girth[] parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Feb 13, 2011
1 parent 7390c3a commit 0644e09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/girth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ module Girth
class Error < ::RuntimeError
end

def self.[](dir)
Repo[dir]
def self.[](*args, &block)
Repo.send(:[], *args, &block)
end

def self.init(*args)
Repo.init(*args)
def self.init(*args, &block)
Repo.init(*args, &block)
end

require 'girth/repo'
Expand Down
2 changes: 1 addition & 1 deletion lib/girth/repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Girth
class Repo

def self.[](dir)
def self.[](dir = nil)
new(dir)
end

Expand Down

0 comments on commit 0644e09

Please sign in to comment.