From 3038fd2a141b6474ad1805a6cec0ae70dd94653a Mon Sep 17 00:00:00 2001 From: Jason Porter Date: Sat, 6 Dec 2014 18:42:14 -0700 Subject: [PATCH 1/2] Update core_manual_ruby.md Update code example to be correct in the set_periodic example --- docs_md/core_manual_ruby.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs_md/core_manual_ruby.md b/docs_md/core_manual_ruby.md index f16c4f2..1a7e67e 100644 --- a/docs_md/core_manual_ruby.md +++ b/docs_md/core_manual_ruby.md @@ -632,9 +632,9 @@ The return value of the method is a unique timer id. You can use this to subsequ You can also set a timer to fire periodically by using the `set_periodic` function. There will be an initial delay equal to the period. The return value of `set_periodic` is a unique timer id (number). This can be later used if the timer needs to be cancelled. The argument passed into the timer event handler is also the unique timer id: - timer_id = Vertx.set_timer(1000) do |timer_id| + timer_id = Vertx.set_periodic(1000) do |timer_id| puts 'And every second this is printed' - end + end puts 'First this is printed' From b045e74bef5efe9f50533393cabcc6baa152fb5a Mon Sep 17 00:00:00 2001 From: Jason Porter Date: Sat, 6 Dec 2014 18:43:55 -0700 Subject: [PATCH 2/2] Update core_manual_ruby.md Whitespace fix from my last commit --- docs_md/core_manual_ruby.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_md/core_manual_ruby.md b/docs_md/core_manual_ruby.md index 1a7e67e..0a69f5b 100644 --- a/docs_md/core_manual_ruby.md +++ b/docs_md/core_manual_ruby.md @@ -634,7 +634,7 @@ You can also set a timer to fire periodically by using the `set_periodic` functi timer_id = Vertx.set_periodic(1000) do |timer_id| puts 'And every second this is printed' - end + end puts 'First this is printed'