Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

mirb TypeError's #176

Closed
jonforums opened this Issue · 3 comments

3 participants

@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
@pbosetti

Same error under OS X Lion/Xcode 4.3

@jonforums

Looks like some unwanted previous state is leaking into the current line's evaluation.

The fail is similar enough to #173 that I'm betting it's in one of the libmruby components, not mirb.

@matz
Owner

I found out where the problem is. It's mrb_get_args(). It also causes #173 and #177.
I will fix it later.

@matz matz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.