diff options
author | Kouhei Sutou <kou@clear-code.com> | 2015-05-27 08:29:29 +0900 |
---|---|---|
committer | Kouhei Sutou <kou@clear-code.com> | 2015-05-27 08:30:24 +0900 |
commit | bd991df4191aa94d8f2f25df6036b04e83c55aa2 (patch) | |
tree | 6f7c283b087e30cf9ae5f9cb2ea5677b56d06c84 | |
parent | d325b92316872e383697cb2d1f2b33a6db09f967 (diff) | |
download | ffi-yajl-bd991df4191aa94d8f2f25df6036b04e83c55aa2.tar.gz |
Ensure DateTime defined instead of specifying super class
-rw-r--r-- | lib/ffi_yajl/ffi/encoder.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ffi_yajl/ffi/encoder.rb b/lib/ffi_yajl/ffi/encoder.rb index e69513f..71b631e 100644 --- a/lib/ffi_yajl/ffi/encoder.rb +++ b/lib/ffi_yajl/ffi/encoder.rb @@ -20,6 +20,7 @@ # 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 @@ -253,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 |