mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 11:25:29 -04:00
Fix variable shadowing
This commit is contained in:
parent
37c5911a23
commit
ce59acae7a
@ -17,7 +17,7 @@ class Plugin
|
|||||||
end
|
end
|
||||||
|
|
||||||
struct Info
|
struct Info
|
||||||
{% for name in ["id", "title", "author", "version", "placeholder"] %}
|
{% for name in ["id", "title", "placeholder"] %}
|
||||||
getter {{name.id}} = ""
|
getter {{name.id}} = ""
|
||||||
{% end %}
|
{% end %}
|
||||||
getter wait_seconds : UInt64 = 0
|
getter wait_seconds : UInt64 = 0
|
||||||
@ -34,7 +34,7 @@ class Plugin
|
|||||||
@json = JSON.parse File.read info_path
|
@json = JSON.parse File.read info_path
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{% for name in ["id", "title", "author", "version", "placeholder"] %}
|
{% for name in ["id", "title", "placeholder"] %}
|
||||||
@{{name.id}} = @json[{{name}}].as_s
|
@{{name.id}} = @json[{{name}}].as_s
|
||||||
{% end %}
|
{% end %}
|
||||||
@wait_seconds = @json["wait_seconds"].as_i.to_u64
|
@wait_seconds = @json["wait_seconds"].as_i.to_u64
|
||||||
@ -234,9 +234,9 @@ class Plugin
|
|||||||
if env.get_top == 2
|
if env.get_top == 2
|
||||||
env.enum 1, LibDUK::Enum::OwnPropertiesOnly
|
env.enum 1, LibDUK::Enum::OwnPropertiesOnly
|
||||||
while env.next -1, true
|
while env.next -1, true
|
||||||
k = env.require_string -2
|
key = env.require_string -2
|
||||||
v = env.require_string -1
|
val = env.require_string -1
|
||||||
headers.add k, v
|
headers.add key, val
|
||||||
env.pop_2
|
env.pop_2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user