jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-3296

Etc.getpwuid should raise TypeError if invalid type

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.1.6
  • Fix Version/s: JRuby 1.2
  • Component/s: Core Classes/Modules
  • Labels:
    None
  • Environment:
    JRuby 1.1.6, Java 1.5, Solaris 10

Description

I was supposed to be using Etc.getpwnam, but made a mistake, which revealed this bug that made one of my test suites very unhappy:

MRI:

irb(main):003:0> Etc.getpwuid(Etc.getlogin)
TypeError: can't convert String into Integer
        from (irb):3:in `getpwuid'
        from (irb):3

JRuby:

irb(main):003:0> Etc.getpwuid(Etc.getlogin)
=> nil
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    3296.patch
    15/Feb/09 6:35 PM
    3 kB
    Joseph LaFata
  2. Text File
    3296-2.patch
    15/Feb/09 7:09 PM
    2 kB
    Joseph LaFata

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Joseph LaFata added a comment - 15/Feb/09 6:35 PM

The attached patch fixes this bug, along with the other Etc specs.

Enjoy

Show
Joseph LaFata added a comment - 15/Feb/09 6:35 PM The attached patch fixes this bug, along with the other Etc specs. Enjoy
Hide
Permalink
Joseph LaFata added a comment - 15/Feb/09 7:09 PM

2nd attempt

Show
Joseph LaFata added a comment - 15/Feb/09 7:09 PM 2nd attempt
Hide
Permalink
Charles Oliver Nutter added a comment - 15/Feb/09 9:06 PM

Fixed in r9187. Thanks for the patch!

Show
Charles Oliver Nutter added a comment - 15/Feb/09 9:06 PM Fixed in r9187. Thanks for the patch!

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    Daniel Berger
Vote (0)
Watch (1)

Dates

  • Created:
    09/Jan/09 1:33 PM
    Updated:
    21/Mar/09 1:14 PM
    Resolved:
    15/Feb/09 9:06 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.