Skip to content

Instantly share code, notes, and snippets.

(gdb) run start_game.rb
Starting program: /usr/bin/ruby start_game.rb
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00560d66 in glTexImage2D () from /usr/lib/libGL.so.1
(gdb) where
#0 0x00560d66 in glTexImage2D () from /usr/lib/libGL.so.1
#1 0x030cf458 in max_quad_size () at utils.c:740
#2 0x030ce4a5 in Init_texplay () at texplay.c:72
require 'mkmf-rice'
create_makefile('virtual')
Stack trace from gdb:
Class:construct .
Class:undef_creation_funcs
Program received signal SIGSEGV, Segmentation fault.
0x00235981 in vm_backtrace () at vm.c:744
744 ary = vm_backtrace_each(th, RUBY_VM_NEXT_CONTROL_FRAME(cfp),
(gdb) where
#0 0x00235981 in vm_backtrace () at vm.c:744
#1 rb_make_backtrace () at vm_eval.c:1356
Winners:
James Kilton, Phouchg, nettix
Losers:
elarnia
The town Maribar has been pillaged by James Kilton. The following resources have been stolen:
Building material: 4916Sulfur: 4228
The town Maribar has been pillaged by Phouchg. The following resources have been stolen:
Building material: 2787Sulfur: 2397
The town Maribar has been pillaged by nettix. The following resources have been stolen:
Building material: 532Sulfur: 458
# Normal
def method
ret_val = "something"
do_this_thing if ret_val == "something"
ret_val
end
# Or with #tap
// Wrapping this method:
int global_do(int x, int y = 3, int z = 10) {
return x * y * z;
}
// Happens like this:
{
typedef int ( *global_do_func_type )( int x, int y, int z );
Rice::define_global_function("global_do",
jroelofs@maude:~$ gem search -r integrity
*** REMOTE GEMS ***
agileanimal-integrity-twitter (1.0.4)
alphasights-integrity (0.1.10)
atmos-integrity-irccat (0.0.3)
badcarl-integrity-jabber (0.1.1)
bantic-integrity (0.1.4.4)
be9-integrity-twitter (1.0.4.1)
#!/usr/bin/env ruby
require 'irb/completion'
require 'irb/ext/save-history'
require 'rubygems'
require 'wirble'
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
str1 = "this is a pretty \
cool way of going about \
makeing really long
\
and neat strings \
yo"
str2 =<<-END
And this way you
dont' need a slash
irb(main):005:0> var = 14
=> 14
irb(main):006:0> b1 = proc {|var| 10 * var }
=> #<Proc:0xb7c4806c@(irb):6>
irb(main):007:0> b1.call(12)
=> 120
irb(main):008:0> var
=> 12
irb(main):009:0> var = 14
=> 14