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
| def yielder | |
| yield | |
| end | |
| x = "yeaaah!" | |
| yielder do | |
| yielder do | |
| x | |
| end |
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
| is_indexed :fields => %w(title description created_at updated_at), | |
| :include => [{:association_name => 'location', :field => 'locality', :as => 'locality'}, | |
| {:association_name => 'location', :field => 'region', :as => 'region'}, | |
| {:association_name => 'location', :field => 'country', :as => 'country'}], | |
| :concatenate => [{:fields => %w(locality region country), :as => "location"}], | |
| :delta => true |
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
| generator = Compiler::TextGenerator.new | |
| node = Compiler.compile_string "1", binding | |
| node.bytecode generator | |
| puts generator.text |
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
| x = 1 | |
| while x < 50000000 | |
| x = x + 1 | |
| end | |
| ; block definition: 0xaaf80 (level 0) | |
| ; 2 registers ; 0 nested blocks | |
| ; 0 args | |
| .local x ; 0 | |
| .value 1 ; 0 |
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
| ======================environment====================== | |
| yarv | |
| command: ruby19 | |
| version: ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0] | |
| jruby | |
| command: PATH=$JDKS_ROOT/1.6.0/Home/bin:$PATH ~/projects/jruby/bin/jruby -server --fast | |
| version: jruby 1.3.0 (ruby 1.8.6 patchlevel 287) (2009-03-12 rev 9393) [x86_64-java] | |
| mri | |
| command: ruby | |
| version: ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin9.3.0] |
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
| ./tinyrb -d -e "1 + 2" | |
| ; block definition: 0x219f80 (level 0) | |
| ; 2 registers ; 0 nested blocks | |
| ; 0 args | |
| .value 1 ; 0 | |
| .value 2 ; 1 | |
| [000] add 0 256 257 | |
| [001] return 0 0 0 | |
| ; block end |
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
| _STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-exceptions -fno-common -Woverloaded-virtual -mmacosx-version-min=10.5 -Wall -W -Wwrite-strings -Wunused -Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -arch i386 -arch x86_64 -c TimeValue.cpp -o /Users/marc/projects/llvm/llvm/lib/System/Release/TimeValue.o | |
| llvm[1]: Building Release Archive Library libLLVMSystem.a | |
| make[1]: *** [/Users/marc/projects/llvm/llvm/Release/lib/libLLVMSystem.a] Error 1 | |
| make: *** [all] Error 1 |
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
| diff --git a/vm/string.c b/vm/string.c | |
| index 64fa97e..9e8dd3e 100644 | |
| --- a/vm/string.c | |
| +++ b/vm/string.c | |
| @@ -1,3 +1,4 @@ | |
| +#include <alloca.h> | |
| #include <stdarg.h> | |
| #include <stdio.h> | |
| #include "tr.h" | |
| @@ -124,14 +125,11 @@ OBJ tr_sprintf(VM, const char *fmt, ...) { |
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
| Nice = Object clone do( | |
| yo = method( | |
| "yo" | |
| ). | |
| is = method( | |
| "indeed" | |
| ). | |
| ). |
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
| Xzibit = Object clone do( | |
| dawg = method(what, | |
| "yo dawg" print. | |
| what print. | |
| "clone" print. | |
| self | |
| ). | |
| so_you_can = method( | |
| "so you can print" print. |