Skip to content

1/2 return (1/2) instead of 0 when I use ruby-units with 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0] #56

@chaomao

Description

@chaomao

1.9.3-p194 :001 > 1/2
=> 0
1.9.3-p194 :002 > require 'ruby-units'
=> true
1.9.3-p194 :003 > 1/2
=> (1/2)
1.9.3-p194 :004 > 1/2.0
=> (1/2)

I didn't install any other gem, and I read ruby-units code a little bit and found nothing. Could someone tell me what happening here because I don't want to change a lot of code in my repository.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions