Skip to content

mirb TypeError's #176

@jonforums

Description

@jonforums

On Arch 32bit with GCC 4.7.0 and Win7 32bit with mingw-w64+GCC 4.7.1 I see the following errors with mirb built from the existing Makefile.


[jon@archee mruby-git]$ git log -2 --oneline
150509c Merge branch 'master' into jonforums-mods/cmake
826386a use mrb_int for struct tm fractions

[...build with standard Makefile ...]

./bin/mirb
...
> Time.gm(2012, 12, 23)
 => Sun Dec 23 00:00:00 UTC 2012
> Time.gm(2012, 12, 23).mday
#<TypeError: can't convert Time into Integer>
> Time.gm(2012, 12, 23).month
#<TypeError: can't convert TypeError into Integer>
> tm = Time.gm(2012, 12, 23)
#<TypeError: can't convert TypeError into Integer>
> tm.mday
#<NoMethodError: no method named mday>
> quit
./bin/mirb
...
> Time.gm(2012, 12, 23).mday
23
> Time.gm(2012, 12, 23)
 => Sun Dec 23 00:00:00 UTC 2012
> Time.gm(2012, 12, 23).mday
#<TypeError: can't convert Time into Integer>


./bin/mruby -e 'puts Time.gm(2012, 12, 23); puts Time.gm(2012, 12, 23).mday; puts Time.gm(2012, 12, 23).month'
Sun Dec 23 00:00:00 UTC 2012
23
12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions