ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:40111] [Ruby 1.9 - Feature #3631] [PATCH] lib/rake.rb: allow passing nil to sh() and ruby()
       [not found] <redmine.issue-3631.20100730140218@ruby-lang.org>
@ 2011-10-12  5:54 ` Suraj Kurapati
  2011-10-12 21:50 ` [ruby-core:40128] " Suraj Kurapati
  2011-10-12 22:44 ` [ruby-core:40129] [Ruby 1.9 - Feature #3631][Closed] " Eric Hodel
  2 siblings, 0 replies; 3+ messages in thread
From: Suraj Kurapati @ 2011-10-12  5:54 UTC (permalink / raw
  To: ruby-core


Issue #3631 has been updated by Suraj Kurapati.


I submitted this patch directly to the Rake project:

  https://github.com/jimweirich/rake/pull/79

If it is accepted there, then perhaps someday it will
find its way back into ruby-core.  One can only dream. :)
----------------------------------------
Feature #3631: [PATCH] lib/rake.rb: allow passing nil to sh() and ruby()
http://redmine.ruby-lang.org/issues/3631

Author: Suraj Kurapati
Status: Assigned
Priority: Normal
Assignee: Nobuyoshi Nakada
Category: lib
Target version: 


=begin
 This patch allows you to pass nil values to Rake's sh() and ruby()
 methods.  This is useful when you want to conditionally pass arguments
 to the child program you are executing.
 
 For example, suppose you want to pass '-v' to a child program if the
 user ran Rake in tracing mode (rake --trace), but not otherwise:
 
   sh 'asciidoc', ('-v' if Rake.application.options.trace), 'input.txt'
 
 Without this patch, you have to carefully construct an arguments array
 so that it does not contain nil values:
 
   args = []
   args << '-v' if Rake.application.options.trace
   args << 'input.txt'
   sh 'asciidoc', *args
 
 Sadly, this becomes very tiresome when performed more than a few times.
 
 Thanks for your consideration.
=end



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:40128] [Ruby 1.9 - Feature #3631] [PATCH] lib/rake.rb: allow passing nil to sh() and ruby()
       [not found] <redmine.issue-3631.20100730140218@ruby-lang.org>
  2011-10-12  5:54 ` [ruby-core:40111] [Ruby 1.9 - Feature #3631] [PATCH] lib/rake.rb: allow passing nil to sh() and ruby() Suraj Kurapati
@ 2011-10-12 21:50 ` Suraj Kurapati
  2011-10-12 22:44 ` [ruby-core:40129] [Ruby 1.9 - Feature #3631][Closed] " Eric Hodel
  2 siblings, 0 replies; 3+ messages in thread
From: Suraj Kurapati @ 2011-10-12 21:50 UTC (permalink / raw
  To: ruby-core


Issue #3631 has been updated by Suraj Kurapati.


Patch was rejected upstream, so please close this issue.
----------------------------------------
Feature #3631: [PATCH] lib/rake.rb: allow passing nil to sh() and ruby()
http://redmine.ruby-lang.org/issues/3631

Author: Suraj Kurapati
Status: Assigned
Priority: Normal
Assignee: Nobuyoshi Nakada
Category: lib
Target version: 


=begin
 This patch allows you to pass nil values to Rake's sh() and ruby()
 methods.  This is useful when you want to conditionally pass arguments
 to the child program you are executing.
 
 For example, suppose you want to pass '-v' to a child program if the
 user ran Rake in tracing mode (rake --trace), but not otherwise:
 
   sh 'asciidoc', ('-v' if Rake.application.options.trace), 'input.txt'
 
 Without this patch, you have to carefully construct an arguments array
 so that it does not contain nil values:
 
   args = []
   args << '-v' if Rake.application.options.trace
   args << 'input.txt'
   sh 'asciidoc', *args
 
 Sadly, this becomes very tiresome when performed more than a few times.
 
 Thanks for your consideration.
=end



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:40129] [Ruby 1.9 - Feature #3631][Closed] [PATCH] lib/rake.rb: allow passing nil to sh() and ruby()
       [not found] <redmine.issue-3631.20100730140218@ruby-lang.org>
  2011-10-12  5:54 ` [ruby-core:40111] [Ruby 1.9 - Feature #3631] [PATCH] lib/rake.rb: allow passing nil to sh() and ruby() Suraj Kurapati
  2011-10-12 21:50 ` [ruby-core:40128] " Suraj Kurapati
@ 2011-10-12 22:44 ` Eric Hodel
  2 siblings, 0 replies; 3+ messages in thread
From: Eric Hodel @ 2011-10-12 22:44 UTC (permalink / raw
  To: ruby-core


Issue #3631 has been updated by Eric Hodel.

Status changed from Assigned to Closed


----------------------------------------
Feature #3631: [PATCH] lib/rake.rb: allow passing nil to sh() and ruby()
http://redmine.ruby-lang.org/issues/3631

Author: Suraj Kurapati
Status: Closed
Priority: Normal
Assignee: Nobuyoshi Nakada
Category: lib
Target version: 


=begin
 This patch allows you to pass nil values to Rake's sh() and ruby()
 methods.  This is useful when you want to conditionally pass arguments
 to the child program you are executing.
 
 For example, suppose you want to pass '-v' to a child program if the
 user ran Rake in tracing mode (rake --trace), but not otherwise:
 
   sh 'asciidoc', ('-v' if Rake.application.options.trace), 'input.txt'
 
 Without this patch, you have to carefully construct an arguments array
 so that it does not contain nil values:
 
   args = []
   args << '-v' if Rake.application.options.trace
   args << 'input.txt'
   sh 'asciidoc', *args
 
 Sadly, this becomes very tiresome when performed more than a few times.
 
 Thanks for your consideration.
=end



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-12 22:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-3631.20100730140218@ruby-lang.org>
2011-10-12  5:54 ` [ruby-core:40111] [Ruby 1.9 - Feature #3631] [PATCH] lib/rake.rb: allow passing nil to sh() and ruby() Suraj Kurapati
2011-10-12 21:50 ` [ruby-core:40128] " Suraj Kurapati
2011-10-12 22:44 ` [ruby-core:40129] [Ruby 1.9 - Feature #3631][Closed] " Eric Hodel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).