25 Jul '12, 1pm

Array#slice's boundary special case.why? - Ruby Forum:

Re: Array#slice's boundary special case.why? Posted by 7stud -- (7stud ) on 2011-04-14 18:22 You're in luck. Gary Wright recently posted the definitive word on that phenomenon: Gary Wright wrote in post #990065: > On Mar 30, 2011, at 2:08 PM, 7stud -- wrote: >>> >>> s[3,0] is "", instead of nil. >> >> That behaviour is contrary to the description in the 1.9.2 docs here: >> >> http://www.ruby-doc.org/core/classes/Array.html > > The docs certainly could be more clear but the actual behavior is > self-consistent and useful. > Note: I'm assuming 1.9.X version of String. > > It helps to consider the numbering in the following way: > > -4 -3 -2 -1 <-- numbering for single argument indexing > 0 1 2 3 > +---+---+---+---+ > | a | b | c | d | > +---+---+---+---+ > 0 1 2 3 4 <-- numbering for 2 argument indexing/start of range > -4 -3 -2 -1 > > The common (and understandable) mistake...

Full article: http://www.ruby-forum.com/topic/1498122

Tweets

Now launched!

lilypirates.livejournal.com 29 Jul '12, 1pm

If you do not receive an email reply from us within 24 hours, it means the item is all pending/sold. Please do check back ...

Now launched!

lilypirates.livejournal.com 29 Jul '12, 1pm

If you do not receive an email reply from us within 24 hours, it means the item is all pending/sold. Please do check back ...

@jovabonito ini linknya

hungrygowhere.com 26 Jul '12, 3am

I remember that there is a haunted/ghost theme restaurant in kallang.... wondering is it still there? and if so, what's th...

Status: Resolved / ONLINE MT @bitcoinstatus: Th...

bitcointalk.org 31 Jul '12, 7am

General discussion about the Bitcoin ecosystem that doesn't fit better elsewhere. News, the Bitcoin community, innovations...

I love the special effects makeup from this film: <3 soooo cool!

I love the special effects makeup from this fil...

michellephan.com 26 Jul '12, 6pm

Special effects makeup can transform actors and actresses into unrecognizable yet extremely believable characters in film....

McRaven: Special Operations More Than Just Comb...

defense.gov 26 Jul '12, 1pm

McRaven: Special Operations More Than Just Combat By Claudette Roulo American Forces Press Service ASPEN, Colo., July 26, ...

synack (1.2.0): A Ruby server for terminal-noti...

rubygems.org 29 Jul '12, 1am

synack 1.0.0 A Ruby server for terminal-notifier install gem install synack Download Documentation Subscribe Stats Authors...

Just been catching up on @AECBnet forum, always...

aecb.net 07 Aug '12, 7am

Find the useful threads. Find the most pressing topics using a referanced index. Moderators: Tahir , Mark Siddall Child Bo...