Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion [Ruby 1.9 - Feature #1081] add File::write() convenience method
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Yusuke Endoh  
View profile  
 More options May 28 2011, 1:50 am
From: Yusuke Endoh <m...@tsg.ne.jp>
Date: Sat, 28 May 2011 14:50:43 +0900
Local: Sat, May 28 2011 1:50 am
Subject: [ruby-core:36523] [Ruby 1.9 - Feature #1081] add File::write() convenience method

Issue #1081 has been updated by Yusuke Endoh.

Target version changed from 1.9.x to 1.9.3

Hello,

The status of this feature request is considered as "accepted".
If anyone writes a patch (in C) for this feature by the implementation deadline (the end of June) and if there is no objection to the patch, it will be imported in 1.9.3.
If not, this feature will be postponed to 1.9.4 or later.

Sora seems to be interested in this feature.  Good luck.

--
Yusuke Endoh <m...@tsg.ne.jp>
----------------------------------------
Feature #1081: add File::write() convenience method
http://redmine.ruby-lang.org/issues/1081

Author: Suraj Kurapati
Status: Assigned
Priority: Normal
Assignee: Yusuke Endoh
Category: core
Target version: 1.9.3

=begin
 Please add a File::write() convenience method to the core Ruby API.

 Currently, it is easier to read whole files than to write them:

   # reading a whole file --- less effort
   text = File::read('foo.txt')

   # writing a whole file --- more effort
   File::open('foo.txt', 'wb') {|f| f.write 'ruby!' }

 This imbalance can be corrected by adding a File::write method,
 such as the following, to the core Ruby API:

   class File
     def self.write path, data, mode = 'wb'
       open(path, mode) {|f| f.write data }
     end
   end

 Thanks for your consideration.
=end

--
http://redmine.ruby-lang.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.