a_matsuda
051ba7b0b4
Alias regist_scanner to register_scanner
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05 16:56:52 +00:00
nobu
76a3f0ca2e
remove unnecessary :stag accessor
...
* lib/erb.rb (ERB::Compiler::TrimScanner#stag): The :stag accessor
has already been available because it is defined in parent
Scanner class. [Fix GH-1445]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 13:48:08 +00:00
nobu
4f8245b703
erb.rb: fronzen-string-literal in comment [Fix GH-1229]
...
* lib/erb.rb (ERB::Compiler#detect_magic_comment): allow
fronzen-string-literal in comment as well as encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29 05:16:29 +00:00
nobu
708a982cb4
erb.rb: duplicated magic comments [Fix GH-1229]
...
* lib/erb.rb (ERB#def_method): insert def line just before the
first non-comment and non-empty line, not to leave duplicated
and stale magic comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29 05:14:31 +00:00
nobu
c55ad90a6e
erb.rb: frozen-string-literal safe
...
* lib/erb.rb (ERB#set_eoutvar): explicitly make mutable string as
a buffer to make ERB work with --enable-frozen-string-literal.
[ruby-core:73561] [Bug #12031 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29 02:14:36 +00:00
seki
32b4a8b36b
Allow ERB subclass to add token easily. [Feature #11936 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-02 07:19:58 +00:00
hsbt
0516a3378f
* lib/erb.rb: revert r53123. It break compatibility like thor and rspec-rails.
...
We should try with Ruby 2.4 or 3.0.
[Bug #11842 ][ruby-core:72374]
* lib/rdoc/erb_partial.rb: ditto.
* template/verconf.h.tmpl: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-20 06:36:57 +00:00
naruse
3e92b635fb
Add frozen_string_literal: false for all files
...
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
2015-12-16 05:07:31 +00:00
hsbt
ec7a964dca
* lib/erb.rb: Render erb with array buffer for function call optimization.
...
[fix GH-1143]
* lib/rdoc/erb_partial.rb: ditto.
* template/verconf.h.tmpl: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-15 07:20:07 +00:00
hsbt
1178a6fdba
* lib/erb.rb: Simplify regexp to optimize erb scanner.
...
[fix GH-1144]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-15 03:20:36 +00:00
nobu
9e52416cd3
erb: set variables from the command line
...
* bin/erb (ARGV.switch, ERB::Main#run): allow variables to be set
from the command line. [ruby-core:65772] [Feature #10395 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12 10:48:57 +00:00
nobu
e82f4195d4
erb: lineno and location setters
...
* lib/erb.rb (ERB#lineno): accessor for line number to eval.
* lib/erb.rb (ERB#location=): setter of file name and line number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12 10:31:47 +00:00
hsbt
e47fec1f86
* lib/drb/acl.rb: Removed meaningless #to_s methods in interpolation.
...
[Feature #10174 ][ruby-core:64584]
* lib/erb.rb: ditto.
* lib/observer.rb: ditto.
* lib/rake/invocation_chain.rb: ditto.
* lib/rubygems/command_manager.rb: ditto.
* lib/rubygems/config_file.rb: ditto.
* lib/uri/common.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-27 12:21:41 +00:00
hsbt
448c87008e
* lib/cgi/core.rb: remove unused variables.
...
* lib/erb.rb: ditto.
* lib/mkmf.rb: ditto.
* lib/net/http/response.rb: ditto.
* lib/optparse/version.rb: ditto.
* lib/prime.rb: ditto.
* lib/racc/parser.rb: ditto.
* lib/rexml/document.rb: ditto.
* lib/rexml/dtd/dtd.rb: ditto.
* lib/rexml/element.rb: ditto.
* lib/rexml/functions.rb: ditto.
* lib/rexml/parsers/xpathparser.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-27 11:04:28 +00:00
nobu
861b7d781e
fix encoding spec
...
"UTF-8" is invalid encoding name in Emacs, use "utf-8" instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-25 07:55:58 +00:00
nobu
4e741f4b89
erb.rb: ERB#result does not accept a proc.
...
* lib/erb.rb (result): [DOC] no longer accepts a Proc, as
Kernel.eval does not. [fix GH-619]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-30 01:22:23 +00:00
hsbt
56654cb04d
* lib/erb.rb: [DOC] fix broken link.
...
Use rubygems.org and www.ruby-toolbox.com instead of RAA. [Bug #9197 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 02:54:55 +00:00
zzak
c366a99cc5
* lib/cgi.rb: [DOC] Capitalize "Ruby" in documentation [Fixes GH-341]
...
Patch by Dave Worth https://github.com/ruby/ruby/pull/341
* lib/webrick.rb: ditto
* lib/scanf.rb: ditto
* lib/xmlrpc/config.rb: ditto
* lib/resolv.rb: ditto
* lib/e2mmap.rb: ditto
* lib/fileutils.rb: ditto
* lib/mkmf.rb: ditto
* lib/cgi/session.rb: ditto
* lib/yaml.rb: ditto
* lib/erb.rb: ditto
* lib/irb.rb: ditto
* lib/tracer.rb: ditto
* lib/net/http.rb: ditto
* ext/syslog/lib/syslog/logger.rb: ditto
* sample/pty/expect_sample.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-18 13:50:32 +00:00
xibbar
747b1a3188
* lib/erb.rb (ERB::Util#url_encode): Unuse regexp special global
...
variable. [Feature #8648 ] Thanks to fotos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16 23:52:43 +00:00
zzak
012dc9d099
* lib/cgi/util.rb, lib/erb.rb: Use String#b [Feature #8394 ] by znz
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-02 06:06:00 +00:00
drbrain
0051369ba3
* hash.c (rb_env_size): Restored documentation for ENV.size
...
* lib/drb/drb.rb: Documented DRb::DRb#run.
* lib/erb.rb (class ERB): Improved documentation of ERb.
* transcode.c: Documented Encoding::Converter constants.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-26 03:58:33 +00:00
zzak
cd6139cacd
* lib/erb.rb: typos for ERB::new link
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 07:13:07 +00:00
zzak
4fa9e3307d
* lib/erb.rb: Document ERB::new trim_mode '-' for lines ending in -%>
...
[ruby-core:51084] [Bug #7608 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23 07:07:18 +00:00
nobu
94cb1c9b4b
* remove trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-05 04:08:17 +00:00
seki
d8164d50c9
* lib/erb.rb (make_compiler, add_put_cmd, add_insert_cmd): extract
...
methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-04 15:10:17 +00:00
nobu
62f7424640
erb.rb: safe concurrent use
...
* lib/erb.rb (ERB#run, ERB#result): eval under isolated bindings for
safe concurrent use. [ruby-core:47638] [Bug #7046 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-09 14:33:11 +00:00
naruse
e9969414bb
* lib/erb.rb (ERB::Util.html_escape): fix r36687: call to_s before
...
passing it to CGI.escapeHTML.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-14 02:01:05 +00:00
shugo
4093598bf6
* lib/erb.rb (ERB::Util.html_escape): use CGI.escape to escape
...
single quotes. [ruby-core:47138] [Bug #6861 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-13 04:17:00 +00:00
drbrain
421875eeff
* lib/erb.rb: Restore documentation for ERB::Util and ERB::DefMethod
...
(oops). [Ruby 1.9 - Bug #4694 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-24 23:24:32 +00:00
drbrain
373ea89e17
* lib/erb.rb: Hide documentation for implementation details of ERB.
...
[Ruby 1.9 - Bug #4694 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-24 23:22:40 +00:00
nobu
d371e3583e
* lib: revert r31635-r31638 and untabify with expand(1).
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-19 00:07:25 +00:00
drbrain
7bbf2f3085
* lib: Convert tabs to spaces for ruby files per
...
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style
Patch by Steve Klabnik [Ruby 1.9 - Bug #4730 ]
Patch by Jason Dew [Ruby 1.9 - Feature #4718 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 21:19:18 +00:00
nobu
3a47cf3395
* remove trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 11:55:52 +00:00
drbrain
6d198d2377
* lib/erb.rb: Document ERB::Compiler. Patch by Simon Chiang.
...
[Ruby 1.9 - Bug #4694 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-14 18:24:11 +00:00
nobu
287a34ae0d
* {ext,lib,test}/**/*.rb: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
seki
2d53925643
remove PercentScanner. fixed % after %> bug. [ruby-dev:37751] [Bug #997 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-11 07:58:02 +00:00
seki
da3eba7551
merged r20850, r17881, r16811, r16763, r16748, r15829, r15794 and r15698 from ruby_1_8.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03 15:36:14 +00:00
yugui
af91b42354
* lib/erb.rb (ERB): m17n of ERB. adds rdoc.
...
fixes #712 . c.f. [ruby-dev:37516].
* lib/erb.rb (ERB::Compiler#compile): recognizes magic comments.
returns a pair of compiled script and its script encoding.
* lib/erb.rb (ERB#set_eoutvar): make generated scripts return a
string in correct encoding.
* lib/erb.rb (ERB#def_method): use Kernel#eval for encoding-awareness
of the evaluated string.
* bin/erb.rb (ERB::Main.run): adds -E and -U options.
String is no longer Enumerable.
* man/erb.1: new manapage.
* test/erb/test_erb_m17n.rb: new test case for m17n features.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 09:26:34 +00:00
kazu
f0bb63782a
* lib/erb.rb: adjust line number for magic comment.
...
* test/erb/test_erb.rb: add tests for def_method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-27 08:48:24 +00:00
naruse
f94c46a745
* lib/erb.rb (ERB::Compiler:Buffer#new): push magic comment first.
...
* lib/erb.rb (ERB::Compiler#compile): fix for broken input.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-25 04:44:32 +00:00
naruse
30e263fc07
* lib/erb.rb (ERB::Compiler#compile): magic comment needs LF.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-25 03:10:57 +00:00
naruse
8eb4988a03
* lib/erb.rb (ERB::Compiler#compile): output magic comment.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-25 00:33:11 +00:00
matz
e6c1752137
* lib/rdoc.rb: massive spelling correction patch from Evan Farrar
...
<evanfarrar at gmail.com> in [ruby-doc:1382] applied.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-04 09:37:38 +00:00
knu
5b7464b047
* lib/erb.rb (ERB::Compiler::TrimScanner#scan_line): Oops. This
...
change did not apply to trunk. Backed out.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-02 07:15:12 +00:00
knu
92623d3db8
* lib/erb.rb (ERB::Compiler::TrimScanner#scan_line): Fix a bug
...
where tokens are not yilelded one by one.
* test/erb/test_erb.rb (TestERBCore#_test_01)
(TestERBCore#test_02_safe_04): The expected value should come
first for assert_equal().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-02 07:10:35 +00:00
seki
b72ef21cd3
[ruby-dev:34497] ERB::Util#url_encode bug fix. Reported by rubikitch.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-30 12:40:52 +00:00
akr
35f28e6b81
* lib/erb.rb (ERB::Revision): cut off locale dependent string in Date
...
keyword.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 16:07:04 +00:00
aamine
2f32af52c4
* lib/erb.rb: String#each was removed, use #each_line instead.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-17 13:03:24 +00:00
seki
b468b45f7a
(ERB::Compiler): add instance variable @insert_cmd to change <%='s behavior.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-10 15:21:45 +00:00
seki
d1d0c52a1e
make module_function
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-12 16:34:45 +00:00