summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-05-27 13:33:56 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-05-27 13:33:56 -0700
commit92fe69e4141cc7fca07eb432c5d16791054311d6 (patch)
tree6f7c283b087e30cf9ae5f9cb2ea5677b56d06c84
parente07997e81d3dd40223fec19372bb7a97eed99fa5 (diff)
parentbd991df4191aa94d8f2f25df6036b04e83c55aa2 (diff)
downloadffi-yajl-92fe69e4141cc7fca07eb432c5d16791054311d6.tar.gz
Merge pull request #62 from kou/fix-superclass-mismatch-for-stringio
Fix superclass mismatch for class StringIO
-rw-r--r--lib/ffi_yajl/ffi/encoder.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ffi_yajl/ffi/encoder.rb b/lib/ffi_yajl/ffi/encoder.rb
index 08debd5..71b631e 100644
--- a/lib/ffi_yajl/ffi/encoder.rb
+++ b/lib/ffi_yajl/ffi/encoder.rb
@@ -20,6 +20,9 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+require 'date'
+require 'stringio'
+
module FFI_Yajl
module FFI
module Encoder
@@ -251,7 +254,7 @@ class Time
end
end
-class DateTime < Date
+class DateTime
def ffi_yajl(yajl_gen, state)
str = self.to_s
if ( status = FFI_Yajl.yajl_gen_string(yajl_gen, str, str.bytesize) ) != 0