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
Test | |
> Line 1 | |
> | |
> Line 2 |
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
Source | |
_global_ = 1 | |
class Blah | |
def foo(a, b) | |
c = a._op_plus(b) | |
_global_.print(c) | |
end | |
end | |
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
def self.first_uninteresting | |
numbers = all(:order=>:number, :conditions=>"number >= 0").map(&:number) | |
highest = numbers.sort.last | |
missing = (1..highest).to_a - numbers | |
return highest + 1 if missing.empty? | |
missing.first | |
end |
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
class String | |
@@words = File.open("dictionary").read.split | |
def self.words | |
@@words | |
end | |
def is_word? | |
@@words.include? self | |
end |
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
Running 686 tests................. | |
In TestBignum::test_from_int: | |
./vm/test/test_bignum.hpp:31: Error: Expected (2147483647 == obj->to_native()), found (2147483647 != -1879048193) | |
.. | |
In TestBignum::test_from_long: | |
./vm/test/test_bignum.hpp:47: Error: Expected (2147483647L == obj->to_long()), found (2147483647 != -1879048193) | |
In TestBignum::test_from_long_negative: | |
./vm/test/test_bignum.hpp:53: Error: Expected ((long)0x80000000L == obj->to_long()), found (-? != 0) | |
In TestBignum::test_from_unsigned_long: | |
./vm/test/test_bignum.hpp:58: Error: Expected (4294967295LU == obj->to_ulong()), found (4294967295 != 2415919103) |
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
#define rb_jgParticleWrap(particle) \ | |
Data_Wrap_Struct(c_jgParticle, NULL, NULL, (particle)) | |
VALUE rb_jgAreaWrap(jgArea *area) | |
{ | |
VALUE wrappedArea = Data_Wrap_Struct(c_jgArea, NULL, NULL, area); | |
VALUE *particles = malloc(area->particles->length * sizeof(VALUE)); | |
for(int i = 0; i < area->particles->length; i++) | |
particles[i] = rb_jgParticleWrap(area->particles->arr[i]); |
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
class Class | |
attr_reader :conditional_methods | |
def defined_when(name, condition, &method) | |
@conditional_methods ||= {} | |
@conditional_methods[name.to_sym] = condition | |
define_method(name) do | |
if self.instance_eval(&condition) | |
self.instance_eval(&method) |
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
(gdb) run | |
The program being debugged has been started already. | |
Start it from the beginning? (y or n) y | |
Starting program: /home/mitchell/dev/rubinius/bin/rbx | |
[Thread debugging using libthread_db enabled] | |
[New Thread 0xb7d706d0 (LWP 20642)] | |
Program received signal SIGSEGV, Segmentation fault. | |
[Switching to Thread 0xb7d706d0 (LWP 20642)] |
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
diff --git a/rakelib/vm.rake b/rakelib/vm.rake | |
index 0deff79..73e3641 100644 | |
--- a/rakelib/vm.rake | |
+++ b/rakelib/vm.rake | |
@@ -665,7 +665,7 @@ file dep_file => EXTERNALS + srcs + hdrs + vm_srcs + generated + %w[vm/gen/instr | |
includes = INCLUDES.join ' ' | |
flags = FLAGS.join ' ' | |
- flags << " -D__STDC_LIMIT_MACROS" | |
+ flags << " -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS" |
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
diff --git a/vm/llvm/inline.cpp b/vm/llvm/inline.cpp | |
index 39174f6..e4eabd7 100644 | |
--- a/vm/llvm/inline.cpp | |
+++ b/vm/llvm/inline.cpp | |
@@ -148,12 +148,12 @@ namespace rubinius { | |
case InstructionSequence::insn_push_int: | |
val = ops_.constant(Fixnum::from(stream[1])); | |
break; | |
- case InstructionSequence::insn_push_literal: | |
+ case InstructionSequence::insn_push_literal: { |
OlderNewer