[#9722] Kernel#system broken inside Dir.chdir(&block) if system command doesn't have shell characters — <noreply@...>

Bugs item #7278, was opened at 2006-12-14 13:59

8 messages 2006/12/14

[#9749] System V IPC in standard library? — Steven Jenkins <steven.jenkins@...>

Back in August, I needed a semaphore to serialize access to an external

14 messages 2006/12/19

[#9753] CVS freeze — SASADA Koichi <ko1@...>

Hi,

20 messages 2006/12/20
[#9755] Re: [ruby-dev:30039] CVS freeze — SASADA Koichi <ko1@...> 2006/12/20

Hi,

[#9757] Re: [ruby-dev:30040] Re: CVS freeze — SASADA Koichi <ko1@...> 2006/12/20

Hi,

[ ruby-Bugs-7379 ] String#slice! documentation bug

From: <noreply@...>
Date: 2006-12-20 06:09:43 UTC
List: ruby-core #9754
Bugs item #7379, was opened at 2006-12-19 23:09
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=7379&group_id=426

Category: Documentation
Group: 1.8.x
Status: Open
Resolution: None
Priority: 3
Submitted By: Daniel Berger (djberg96)
Assigned to: Nobody (None)
Summary: String#slice! documentation bug

Initial Comment:
Hi,

The documentation for String#slice! says, "The forms that take a Fixnum will raise an IndexError if the value is out of range; the Range form will raise a RangeError..."

However, I cannot duplicate this behavior. Whenever I try to force an
IndexError, for example, I just get back nil, i.e. the same behavior as String.slice.

irb(main):001:0> VERSION
=> "1.8.4"
irb(main):002:0> s = "hello"
=> "hello"
irb(main):003:0> s.slice!(-5,-99)
=> nil
irb(main):004:0> s
=> "hello"
irb(main):005:0> s.slice!(-5,100)
=> "hello"
irb(main):006:0> s
=> ""

I've filed this as a documentation bug, but I suppose it could be an implementation bug, since I'm not sure what the desired behavior is.

Regards,

Dan

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=7379&group_id=426

In This Thread

Prev Next