Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

again

  • Loading branch information...
commit b44bc2e391280b95c8f2ace65b3bcd4ad2beac4b 1 parent d9500d1
@brianmario authored
Showing with 3 additions and 1 deletion.
  1. +1 −1  ext/yajl/yajl_ext.c
  2. +2 −0  spec/encoding/encoding_spec.rb
View
2  ext/yajl/yajl_ext.c
@@ -192,8 +192,8 @@ void yajl_encode_part(void * wrapper, VALUE obj, VALUE io) {
len = RSTRING_LEN(str);
status = yajl_gen_number(w->encoder, cptr, len);
} else {
+ rb_p(rb_funcall(obj, rb_intern("method"), 1, ID2SYM(intern_to_s)));
str = rb_funcall(obj, intern_to_s, 0);
- fprintf(stderr, "Value is: %s\n", RSTRING_PTR(rb_inspect(str)));
Check_Type(str, T_STRING);
cptr = RSTRING_PTR(str);
len = RSTRING_LEN(str);
View
2  spec/encoding/encoding_spec.rb
@@ -265,6 +265,8 @@ def to_s
it "return value of #to_s must be a string" do
lambda {
+ val = TheMindKillerDuce.new.to_s
+ puts "Value is: #{val.inspect}"
Yajl::Encoder.encode(TheMindKillerDuce.new)
}.should raise_error(TypeError)
end
Please sign in to comment.
Something went wrong with that request. Please try again.