JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-6596

poor error message or request for more functionality for include_package java.awt.image

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      jruby 1.7.0.dev (ruby-1.9.3-p139) (2012-04-10 36a6987) (Java HotSpot(TM) Client VM 1.6.0_26) [Windows 7-x86-java]
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      Hello.
      I would expect the following to work, or else complain "earlier" than it does, or else throw a different exception message
      Thanks!

      >> require 'java'
      => true
      irb(main):002:0> module M; include_package java.awt.image; end
      => nil
      irb(main):003:0> M::BufferedImage
      ArgumentError: Java package `java.awt.image' does not have a method `+'
              from file:/C:/dev/ruby/downloads/jruby/lib/jruby.jar!/jruby/java/java_package_module_template.rb:31:in `method_missing'
              from file:/C:/dev/ruby/downloads/jruby/lib/jruby.jar!/jruby/java/core_ext/module.rb:26:in `const_missing'
              from org/jruby/RubyArray.java:1611:in `each'
              from file:/C:/dev/ruby/downloads/jruby/lib/jruby.jar!/jruby/java/core_ext/module.rb:24:in `const_missing'
              from (irb):3:in `evaluate'
              from org/jruby/RubyKernel.java:1037:in `eval'
              from org/jruby/RubyKernel.java:1353:in `loop'
              from org/jruby/RubyKernel.java:1146:in `catch'
              from org/jruby/RubyKernel.java:1146:in `catch'
      

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Thomas E Enebo
            Reporter:
            Roger Pack
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: