Permalink
Browse files

The rb_unbound_get_class() in app.c didn't work with Ruby1.9.3p125. S…

…o, added a patch without using the function. Now class-book.rb works.
  • Loading branch information...
ashbb committed Mar 5, 2012
1 parent fe3c1db commit b9e86ffd6f2e7438d5aae733e9b6d80ffcee37eb
Showing with 3 additions and 2 deletions.
  1. +1 −1 lib/shoes.rb
  2. +2 −1 shoes/app.c
View
@@ -362,7 +362,7 @@ def self.run(path)
unless rout.is_a? Proc
rout = rout[0].instance_method(rout[1])
end
return [rout, args]
return [rout, args, rout.owner]
end
end
case uri.path when "/"
View
@@ -369,7 +369,8 @@ shoes_app_visit(shoes_app *app, char *path)
exec.block = rb_ary_entry(meth, 0);
exec.args = rb_ary_entry(meth, 1);
if (rb_obj_is_kind_of(exec.block, rb_cUnboundMethod)) {
VALUE klass = rb_unbound_get_class(exec.block);
//VALUE klass = rb_unbound_get_class(exec.block);
VALUE klass = rb_ary_entry(meth, 2);
exec.canvas = app->nestslot = shoes_slot_new(klass, ssNestSlot, app->canvas);
exec.block = rb_funcall(exec.block, s_bind, 1, exec.canvas);
exec.ieval = 0;

0 comments on commit b9e86ff

Please sign in to comment.