Skip to content

java.lang.ArrayList#add automatically converts Ruby's Time to java.util.Date #2049

@danielribeiro

Description

@danielribeiro

Hi,

This happens using java 7 and jruby 1.7.16. The reproduction code is:

puts JRUBY_VERSION
require 'java'
time = Time.now
ar = java.util.ArrayList.new
ar.add time
puts time
puts time.class
puts ar[0]
puts ar[0].class

Output:

screen shot 2014-10-15 at 6 49 21 pm

Cheers,

  • Daniel

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions