[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

[ ruby-Bugs-8990 ] File.size and IO.stat.size sometimes give different results

From: <noreply@...>
Date: 2007-05-29 16:00:42 UTC
List: ruby-core #11298
Bugs item #8990, was opened at 2007-03-02 02:03
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=8990&group_id=426

>Category: Triage (do not select)
Group: 1.8.5
Status: Open
Resolution: None
Priority: 3
Submitted By: Martin Kihlgren (zond)
Assigned to: Nobody (None)
Summary: File.size and IO.stat.size sometimes give different results

Initial Comment:
In our rails project we did a Pathname.size on a file uploaded in the same request. As far as I can tell Pathname.size calls File.size.

Even though `ls -l` and `stat` gave correct sizes (about 4MB) at that point in the code, Pathname.size gave 15 bytes.

So we tried different ways, and ended up using stat(f).size, which gave a correct result.

According to the source IO.stat uses fstat, and File.size uses rb_stat, but I havent looked into the differences in those. Maybe you know more than I do :)

regards,
//Martin Kihlgren

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

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

In This Thread

Prev Next