aboutsummaryrefslogtreecommitdiffstats
path: root/lib/shellwords.rb
Commit message (Collapse)AuthorAgeFilesLines
* remove duplicated frozen_string_literal magic commentnaruse2015-12-161-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb (Shellwords#shellsplit): Document that thisknu2015-12-131-0/+7
| | | | | | method does not treat shell metacharacters as such. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/shellwords.rb: do not change API with frozen-string-literalnormal2015-12-131-1/+1
| | | | | | | | | | This fixes a bug introduced in r53066 when attempting to shellescape an empty string. * lib/shellwords.rb (shellescape): duplicate frozen literal * test/test_shellwords.rb (test_stringification): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: Turn on frozen-string-literal after fixingknu2015-12-131-3/+3
| | | | | | shellsplit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* disable frozen-string-literalnobu2015-12-101-0/+1
| | | | | | | * lib/mkmf.rb, lib/shellwords.rb: disable frozen-string-literal. [ruby-core:72011] [Bug #11800] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: proofreading documentation.hsbt2014-09-051-9/+9
| | | | | | [Bug #10155][ruby-core:64471] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] Fix output of Shellwords.escape() by @anatol [Fixes GH-483]a_matsuda2013-12-141-1/+1
| | | | | | | | * lib/shellwords.rb: Fix output of Shellwords.escape() https://github.com/ruby/ruby/pull/483 [ci-skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add back my original example of Shellwords#shellescape.knu2012-11-091-0/+9
| | | | | | | * lib/shellwords.rb (Shellwords#shellescape): Add back my original real world example with some enhancement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix an example of Shellwords#shellescape.knu2012-11-091-3/+1
| | | | | | | | * lib/shellwords.rb (Shellwords#shellescape): Undo part of the previous rdoc change. This new example using a string-only array was not in line with the description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: Documentation for Shellwords.zzak2012-09-121-35/+76
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb (Shellwords#shellescape): shellescape() nowknu2012-01-121-2/+12
| | | | | | | | | | stringifies the given object using to_s. * lib/shellwords.rb (Shellwords#shelljoin): shelljoin() accepts non-string objects in the given array, each of which is stringified using to_s. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: Fix rdoc markups.knu2012-01-121-17/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb (Shellwords#shellsplit): Fix a bug whereknu2012-01-121-1/+1
| | | | | | | consecutive backslashes in double quotes are all removed except the one at the tail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb (Shellwords#shellescape): Drop the //n flagknu2012-01-011-3/+9
| | | | | | | that only causes warnings with no real effect. [Bug #5637] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: Update toplevel comment with an example. Patchdrbrain2011-10-031-9/+15
| | | | | | | by Samnang Chhun. [Ruby 1.9 - Bug #5388] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ipaddr.rb: Say that I am the current maintainer.knu2008-03-211-0/+3
| | | | | | | | | | | * lib/set.rb: Ditto. * lib/shellwords.rb: Ditto. * ext/syslog/syslog.txt: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: scape should be an alias to shellescape. amatz2008-01-141-1/+1
| | | | | | | patch from Masahiro Kawato <m-kawato AT mwb.biglobe.ne.jp> in [ruby-dev:33060]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: Add shellescape() and shelljoin().knu2007-09-111-18/+127
| | | | | | | | | | | | | | | * lib/shellwords.rb: Rename shellwords() to shellsplit() and make the former an alias to the latter. * lib/shellwords.rb: Add escape(), split(), join() as class methods, which are aliases to their respective long names prefixed with `shell'. * lib/shellwords.rb: Add String#shellescape(), String#shellsplit() and Array#shelljoin() for convenience. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/extmk.rb, lib/fileutils.rb, lib/mkmf.rb, lib/optparse.rb,nobu2006-10-091-1/+0
| | | | | | | lib/shellwords.rb: get rid of shadowing outer local variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: fix for blank but not empty string.nobu2005-11-101-9/+5
| | | | | | | fixed: [ruby-dev:27663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: refactored. [ruby-core:06581]nobu2005-11-081-22/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c (rb_glob2): do not allocate buffer from heap to avoidmatz2004-11-101-2/+2
| | | | | | | | | | | | | | | memory leaks. use string object for buffering instead. [ruby-dev:24738] * dir.c (join_path): ditto. * io.c (io_read): external input buffer may be modified even after rb_str_locktmp(). [ruby-dev:24735] * dir.c (fnmatch): p or s may be NULL. [ruby-dev:24749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: Embed rdoc style comments.knu2003-01-261-24/+36
| | | | | | | | | | * lib/shellwords.rb (shellwords): Use String#lstrip!. * lib/shellwords.rb (shellwords): Recognize an object that responds to to_str() by using String.new(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb (shellwords): A backslash ('\') in singleknu2003-01-191-2/+1
| | | | | | | | quotes should not be regarded as meta character. This bug or maybe feature was inherited from Perl's shellwords.pl. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/shellwords.rb: don't destroy argument.wakou2001-06-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* matzmatz2000-08-011-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2000-02-08matz2000-02-081-14/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 1.4.0matz1999-08-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* This commit was generated by cvs2svn to compensate for changes in r372,matz1999-01-201-9/+7
| | | | | | | which included commits to RCS files with non-trunk default branches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial revisionmatz1998-01-161-0/+48
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8 b2dd03c8-39d4-4d8f-98ff-823fe69b080e