Skip to content

Instantly share code, notes, and snippets.

View dbussink's full-sized avatar

Dirkjan Bussink dbussink

View GitHub Profile
diff --git a/lib/rbconfig.rb b/lib/rbconfig.rb
index 98456ce..ed99d89 100644
--- a/lib/rbconfig.rb
+++ b/lib/rbconfig.rb
@@ -107,7 +107,7 @@ module Config
CONFIG["MANTYPE"] = "doc"
CONFIG["MAKEFILES"] = "Makefile"
# compile tools flags
- CONFIG["CFLAGS"] = "-ggdb3 -O2"
+ CONFIG["CFLAGS"] = "-ggdb3 -O2 -fPIC"
diff --git a/lib/rbconfig.rb b/lib/rbconfig.rb
index 98456ce..ed99d89 100644
--- a/lib/rbconfig.rb
+++ b/lib/rbconfig.rb
@@ -107,7 +107,7 @@ module Config
CONFIG["MANTYPE"] = "doc"
CONFIG["MAKEFILES"] = "Makefile"
# compile tools flags
- CONFIG["CFLAGS"] = "-ggdb3 -O2"
+ CONFIG["CFLAGS"] = "-ggdb3 -O2 -fPIC"
diff --git a/lib/ext/openssl/ossl_x509name.c b/lib/ext/openssl/ossl_x509name.c
index ae50dc0..9348421 100644
--- a/lib/ext/openssl/ossl_x509name.c
+++ b/lib/ext/openssl/ossl_x509name.c
@@ -141,7 +141,7 @@ ossl_x509name_initialize(int argc, VALUE *argv, VALUE self)
unsigned char *p;
VALUE str = ossl_to_der_if_possible(arg);
StringValue(str);
- p = RSTRING_PTR(str);
+ p = (unsigned char*) RSTRING_PTR(str);
>> h = Hash.new
=> {}
>> i = Hash.new
=> {}
>> {i => 1, h => 2}
=> {{}=>2}
>>
>> test = Struct.new("Test")
dirkjan@nvc1372 ~/Documents/projects/do/data_objects master $ ../../rubinius/bin/rbx -S rake spec
(in /Users/dirkjan/Documents/projects/do/data_objects)
/Users/dirkjan/Documents/projects/rubinius/bin/rbx -I"lib:lib:spec" "/Users/dirkjan/Documents/projects/rubinius/gems/rubinius/preinstalled/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "spec/command_spec.rb" "spec/connection_spec.rb" "spec/pooling_spec.rb" "spec/reader_spec.rb" "spec/result_spec.rb" "spec/transaction_spec.rb" "spec/uri_spec.rb"
An exception occurred running /Users/dirkjan/Documents/projects/rubinius/gems/rubinius/preinstalled/gems/rake-0.8.7/lib/rake/rake_test_loader.rb
Tried to use object of type Object (43) as type String (48) (TypeError)
Backtrace:
main.__script__ at lib/data_objects/uri.rb:1
Rubinius::CompiledMethod#as_script at kernel/common/compiled_method.rb:230
Requirer::Utils.single_load at kernel/delta/requirer.rb:251
#!/usr/bin/env ruby -Ku
# encoding: utf-8
require 'rubygems'
require 'dm-core'
require 'pp'
DataMapper::Logger.new($stdout, :debug)
DataMapper.setup(:default, 'sqlite3:memory:')
diff --git a/kernel/common/compiled_method.rb b/kernel/common/compiled_method.rb
index 4828aeb..11b3ca1 100644
--- a/kernel/common/compiled_method.rb
+++ b/kernel/common/compiled_method.rb
@@ -274,7 +274,7 @@ module Rubinius
i += 2
end
- return -1
+ -1
dirkjan@nvc1372 ~/Documents/projects/rubinius master $ rake
(in /Users/dirkjan/Documents/projects/rubinius)
/Users/dirkjan/Documents/projects/rubinius/rakelib/kernel.rake:83: warning: shadowing outer local variable - rb
unknown: warning: instance variable @suffix_pattern not initialized
unknown: warning: global variable `$TESTING' not initialized
unknown: warning: instance variable @opcode_ids not initialized
unknown: warning: instance variable @opcodes not initialized
unknown: warning: instance variable @opcodes_map not initialized
unknown: warning: nested repeat operator + and ? was replaced with '*': /__(?:(?:\w|_)+)?block__/
unrecognized defined? arg: 47 (NODE_YIELD)Abort trap
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t now;
struct tm *ts;
char buf[80];
/* Some distant moment in the past */
dirkjan@nvc1372 ~/Documents/projects/rubinius master $ gdb --args ./bin/rbx -XJ
GNU gdb 6.3.50-20050815 (Apple version gdb-1344) (Fri Jul 3 01:19:56 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .... done
(gdb) run