-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Josep M. Bach
committed
Dec 31, 2012
1 parent
d4bcee5
commit b3491f8
Showing
24 changed files
with
562 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
default_greeting = 'hello' | ||
greeter = {} | ||
greeter.greet = -> name { | ||
puts default_greeting + ' ' + name + '!' | ||
} | ||
greeter.greet('world') |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
a = ['hello world',2,3] | ||
puts a | ||
symbol = '* ' | ||
greetings = ['hello', 'world', 'to', 'everyone!'] | ||
cls = -> greeting { | ||
puts symbol + greeting | ||
} | ||
greetings.each(cls) | ||
puts 'done!' |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
_main | ||
:5:26 | ||
"hello | ||
"to_map | ||
"block_524 | ||
"greet | ||
"world | ||
17 PUSH | ||
0 | ||
33 SETLOCAL | ||
0 | ||
68 MAKEVEC | ||
0 | ||
128 SEND | ||
1 | ||
0 | ||
33 SETLOCAL | ||
1 | ||
32 PUSHLOCAL | ||
1 | ||
67 DEFN | ||
2 | ||
65 SETSLOT | ||
3 | ||
32 PUSHLOCAL | ||
1 | ||
17 PUSH | ||
4 | ||
128 SEND | ||
3 | ||
1 | ||
20 PUSHNIL | ||
144 RET | ||
_block_524 | ||
:4:23 | ||
" | ||
"+ | ||
"! | ||
"puts | ||
16 PUSHSELF | ||
34 PUSHLOCALDEPTH | ||
1 | ||
0 | ||
17 PUSH | ||
0 | ||
128 SEND | ||
1 | ||
1 | ||
32 PUSHLOCAL | ||
0 | ||
128 SEND | ||
1 | ||
1 | ||
17 PUSH | ||
2 | ||
128 SEND | ||
1 | ||
1 | ||
128 SEND | ||
3 | ||
1 | ||
144 RET | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,64 @@ | ||
_main | ||
:4:18 | ||
3 | ||
2 | ||
"hello world | ||
:9:35 | ||
"* | ||
"everyone! | ||
"to | ||
"world | ||
"hello | ||
"block_524 | ||
"each | ||
"done! | ||
"puts | ||
17 PUSH | ||
0 | ||
33 SETLOCAL | ||
0 | ||
17 PUSH | ||
1 | ||
17 PUSH | ||
2 | ||
68 MAKEVEC | ||
17 PUSH | ||
3 | ||
17 PUSH | ||
4 | ||
68 MAKEVEC | ||
4 | ||
33 SETLOCAL | ||
0 | ||
1 | ||
67 DEFN | ||
5 | ||
33 SETLOCAL | ||
2 | ||
32 PUSHLOCAL | ||
1 | ||
32 PUSHLOCAL | ||
2 | ||
128 SEND | ||
6 | ||
1 | ||
16 PUSHSELF | ||
17 PUSH | ||
7 | ||
128 SEND | ||
8 | ||
1 | ||
20 PUSHNIL | ||
144 RET | ||
_block_524 | ||
:2:13 | ||
"+ | ||
"puts | ||
16 PUSHSELF | ||
34 PUSHLOCALDEPTH | ||
1 | ||
0 | ||
32 PUSHLOCAL | ||
0 | ||
128 SEND | ||
3 | ||
0 | ||
1 | ||
128 SEND | ||
1 | ||
1 | ||
20 PUSHNIL | ||
144 RET | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.