fix some error message in Struct#[] #278

merged 1 commit into from Sep 29, 2012


None yet
3 participants

kachick commented Aug 31, 2012

For below case.

Foo = :foo
foo = true


ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]

foo[-2]   #=> offset -1 too small for struct(size:1) (IndexError)
foo[:bar] #=> no member 'bar' in struct (NameError)


jruby 1.7.0.preview2 (1.9.3p203) 2012-08-31 aeef1b8 on Java HotSpot(TM) 64-Bit Server VM 1.6.0_33-b03-424-11M3720 [darwin-x86_64]

foo[-2]   #=> IndexError: offset -1 too large for struct (size:1)
foo[:bar] #=> NameError: bar is not struct member

This comment has been minimized.

Show comment
Hide comment

travisbot Aug 31, 2012

This pull request fails (merged 17fa907 into b247119).

This pull request fails (merged 17fa907 into b247119).

headius added a commit that referenced this pull request Sep 29, 2012

@headius headius merged commit 5e1ea4a into jruby:master Sep 29, 2012

@kachick kachick deleted the kachick:fix/error-message-in_Struct branch Dec 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment