[DRE-commits] [SCM] ruby-yajl.git branch, master, updated. debian/0.8.3-2-11-g47e922d

Praveen Arimbrathodiyil pravi.a at gmail.com
Tue Sep 27 08:16:17 UTC 2011


The following commit has been merged in the master branch:
commit 3f96bb27834cd0721bd7577dd8d8ad7beae72d47
Author: Praveen Arimbrathodiyil <pravi.a at gmail.com>
Date:   Tue Sep 27 11:29:33 2011 +0530

    refresh the patch as diff from 1.0.0

diff --git a/debian/patches/001-encoding-spec-upstream-fix.patch b/debian/patches/001-encoding-spec-upstream-fix.patch
index 235dc64..1b12737 100644
--- a/debian/patches/001-encoding-spec-upstream-fix.patch
+++ b/debian/patches/001-encoding-spec-upstream-fix.patch
@@ -1,35 +1,28 @@
-From: Brian Lopez - https://github.com/brianmario
-Subject: make sure to_json doesn't exist 
-
-* ext/yajl/yajl_ext.c
-* spec/encoding/encoding_spec.rb
-
-Origin: upstream, https://github.com/brianmario/yajl-ruby/commit/527f486a6754a793ff4221713bac2779736a425d
-Bug: https://github.com/brianmario/yajl-ruby/issues/83
-
-diff --git a/ext/yajl/yajl_ext.c b/ext/yajl/yajl_ext.c
-index 708b72a..9f03546 100644
---- a/ext/yajl/yajl_ext.c
-+++ b/ext/yajl/yajl_ext.c
-@@ -192,7 +192,6 @@ 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);
-                 Check_Type(str, T_STRING);
-                 cptr = RSTRING_PTR(str);
 diff --git a/spec/encoding/encoding_spec.rb b/spec/encoding/encoding_spec.rb
-index 52bb626..e6ecfed 100644
+index f889a9b..b02c2e0 100644
 --- a/spec/encoding/encoding_spec.rb
 +++ b/spec/encoding/encoding_spec.rb
-@@ -265,8 +265,9 @@ describe "Yajl JSON encoder" do
+@@ -9,13 +9,13 @@ end
+ 
+ class TheMindKiller
+   def to_json
+-    @wait_i_dont_exist_this_is_a_horrible_mistake_dont_do_it_aiiiiiiiiieeeeeee
++    nil
+   end
+ end
+ 
+ class TheMindKillerDuce
+   def to_s
+-    @wait_i_dont_exist_this_is_a_horrible_mistake_dont_do_it_aiiiiiiiiieeeeeee
++    nil
+   end
+ end
+ 
+@@ -265,6 +265,9 @@ describe "Yajl JSON encoder" do
  
    it "return value of #to_s must be a string" do
      lambda {
--      val = TheMindKillerDuce.new.to_s
--      puts "Value is: #{val.inspect}"
-+      if TheMindKillerDuce.send(:method_defined?, :abc)
++      if TheMindKillerDuce.send(:method_defined?, :to_json)
 +        TheMindKillerDuce.send(:undef_method, :to_json)
 +      end
        Yajl::Encoder.encode(TheMindKillerDuce.new)

-- 
ruby-yajl.git



More information about the Pkg-ruby-extras-commits mailing list