From a2e03279e2bd4bb4c5517fdf9e2548bf6f100699 Mon Sep 17 00:00:00 2001 From: Mathieu Gagnon Date: Thu, 11 Feb 2016 17:58:09 -0500 Subject: [PATCH 1/2] Fix abs code sample in doc/site/modules/core/num -123.abs returns -123 because the dot has higher precedence so it's really -(123.abs). --- doc/site/modules/core/num.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/site/modules/core/num.markdown b/doc/site/modules/core/num.markdown index f00b785c..2f78f16c 100644 --- a/doc/site/modules/core/num.markdown +++ b/doc/site/modules/core/num.markdown @@ -20,7 +20,7 @@ The value of π. The absolute value of the number. :::wren - System.print(-123.abs) //> 123 + System.print( (-123).abs ) //> 123 ### **acos** From ff69b12c2cb7103e1a10dbc96162759ec19fc166 Mon Sep 17 00:00:00 2001 From: Mathieu Gagnon Date: Thu, 11 Feb 2016 18:06:51 -0500 Subject: [PATCH 2/2] Fix sample in doc/site/error-handling Add missing constructor. --- doc/site/error-handling.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/site/error-handling.markdown b/doc/site/error-handling.markdown index 87b1fdbe..42e3574e 100644 --- a/doc/site/error-handling.markdown +++ b/doc/site/error-handling.markdown @@ -49,7 +49,9 @@ not found" one. If you call a method on an object and its class (and all of its superclasses) don't define that method, there's nothing Wren can do: :::wren - class Foo {} + class Foo { + construct new() {} + } var foo = Foo.new() foo.someRandomMethod