to_source 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +6 -0
- data/lib/to_source/visitor.rb +1 -3
- data/spec/unit/to_source/visitor/class_methods/run_spec.rb +9 -0
- data/to_source.gemspec +1 -1
- metadata +1 -1
data/Changelog.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# v0.2.9 2013-01-4
|
2
|
+
|
3
|
+
* [fixed] Handle regexp literals containing slashes in non shash delimiters %r(/) correctly
|
4
|
+
|
5
|
+
[Compare v0.2.8..v0.2.9](https://github.com/mbj/to_source/compare/v0.2.8...v0.2.9)
|
6
|
+
|
1
7
|
# v0.2.8 2013-01-3
|
2
8
|
|
3
9
|
* [Changed] Emit many times more ugly code, but correctnes > beautifulnes
|
data/lib/to_source/visitor.rb
CHANGED
@@ -320,6 +320,10 @@ describe ToSource::Visitor,'.run' do
|
|
320
320
|
context 'with escapes' do
|
321
321
|
assert_source '/\//'
|
322
322
|
end
|
323
|
+
|
324
|
+
context 'with non slash literal containing slashes' do
|
325
|
+
assert_converts '/\//', '%r(/)'
|
326
|
+
end
|
323
327
|
end
|
324
328
|
|
325
329
|
context 'dynamic string' do
|
@@ -390,10 +394,15 @@ describe ToSource::Visitor,'.run' do
|
|
390
394
|
end
|
391
395
|
|
392
396
|
context 'to self' do
|
397
|
+
|
393
398
|
context 'explicitly' do
|
394
399
|
assert_source 'self.foo'
|
395
400
|
end
|
396
401
|
|
402
|
+
context 'explicitly with message name equals a keyword' do
|
403
|
+
assert_source 'self.and'
|
404
|
+
end
|
405
|
+
|
397
406
|
context 'implicitly' do
|
398
407
|
assert_source 'foo'
|
399
408
|
end
|
data/to_source.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'to_source'
|
4
|
-
s.version = '0.2.
|
4
|
+
s.version = '0.2.9'
|
5
5
|
s.authors = ['Josep M. Bach', 'Markus Schirp']
|
6
6
|
s.email = ['josep.m.bach@gmail.com', 'mbj@seonic.net']
|
7
7
|
s.homepage = 'http://github.com/txus/to_source'
|