Created
October 25, 2019 06:23
-
-
Save danidiaz/3a726b15648c1d140f03ef5a25987ba4 to your computer and use it in GitHub Desktop.
Minimal Ruby program for experimenting with truffle-ruby tooling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Foo | |
| def initialize() | |
| @val = 0 | |
| end | |
| def go_up() | |
| @val+=1 | |
| end | |
| def go_down() | |
| @val-=1 | |
| end | |
| end | |
| foos = [Foo.new, Foo.new, Foo.new] | |
| loop do | |
| foos.each do |x| | |
| x.go_up() | |
| x.go_down() | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment