explicitly set the local var for 1.9
This commit is contained in:
+6
-3
@@ -184,7 +184,8 @@ module Gollum
|
|||||||
def write_page(name, format, data, commit = {})
|
def write_page(name, format, data, commit = {})
|
||||||
commit = normalize_commit(commit)
|
commit = normalize_commit(commit)
|
||||||
index = nil
|
index = nil
|
||||||
sha1 = commit_index(commit) do |index|
|
sha1 = commit_index(commit) do |idx|
|
||||||
|
index = idx
|
||||||
add_to_index(index, '', name, format, data)
|
add_to_index(index, '', name, format, data)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -216,7 +217,8 @@ module Gollum
|
|||||||
dir = ::File.dirname(page.path)
|
dir = ::File.dirname(page.path)
|
||||||
dir = '' if dir == '.'
|
dir = '' if dir == '.'
|
||||||
index = nil
|
index = nil
|
||||||
sha1 = commit_index(commit) do |index|
|
sha1 = commit_index(commit) do |idx|
|
||||||
|
index = idx
|
||||||
if page.name == name && page.format == format
|
if page.name == name && page.format == format
|
||||||
index.add(page.path, normalize(data))
|
index.add(page.path, normalize(data))
|
||||||
else
|
else
|
||||||
@@ -243,7 +245,8 @@ module Gollum
|
|||||||
# Returns the String SHA1 of the newly written version.
|
# Returns the String SHA1 of the newly written version.
|
||||||
def delete_page(page, commit)
|
def delete_page(page, commit)
|
||||||
index = nil
|
index = nil
|
||||||
sha1 = commit_index(commit) do |index|
|
sha1 = commit_index(commit) |idx|
|
||||||
|
index = idx
|
||||||
index.delete(page.path)
|
index.delete(page.path)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user