fix: correct Fiber instantiation syntax in README code example

The example previously used `new Fiber { ... }` which is incorrect Wren syntax; changed to `Fiber.new { ... }` to match the language's constructor pattern.
This commit is contained in:
Bob Nystrom
2015-07-20 14:34:30 +00:00
parent 67f1480bf0
commit 847edd8e1e
+1 -1
View File
@@ -12,7 +12,7 @@ class Wren {
} }
} }
var adjectives = new Fiber { var adjectives = Fiber.new {
["small", "clean", "fast"].each {|word| Fiber.yield(word) } ["small", "clean", "fast"].each {|word| Fiber.yield(word) }
} }