heredoc_unindent 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.rdoc +8 -0
- data/Rakefile +1 -1
- data/lib/heredoc_unindent.rb +1 -1
- data/test/test_heredoc_unindent.rb +2 -0
- metadata +2 -2
- metadata.gz.sig +2 -2
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
data/Rakefile
CHANGED
data/lib/heredoc_unindent.rb
CHANGED
@@ -21,7 +21,7 @@ module CoreExt
|
|
21
21
|
if margins.first != margins_min && warn_first_not_min
|
22
22
|
puts "warning: margin of the first line differs from minimum margin"
|
23
23
|
end
|
24
|
-
return in_place ? nil : self unless margins_min != 0
|
24
|
+
return in_place ? nil : self.dup unless margins_min != 0
|
25
25
|
re = Regexp.new('^\s{0,' + margins_min.to_s + '}' ) # omitting the lower limit produces warnings and wrong behavior in ruby-1.8.7-p330 and ree-1.8.7-2010.02
|
26
26
|
in_place ? gsub!(re, '') : gsub(re, '')
|
27
27
|
end
|
@@ -81,6 +81,8 @@ EOS
|
|
81
81
|
assert_equal pretty, ugly.unindent!(false)
|
82
82
|
assert_equal pretty, ugly
|
83
83
|
assert_equal nil, ugly.unindent!(false)
|
84
|
+
aux = pretty.unindent(false)
|
85
|
+
assert_not_same aux, aux.unindent(false), 'out-of-place method should never return the same object, but a copy'
|
84
86
|
end
|
85
87
|
|
86
88
|
def test_warning
|
metadata
CHANGED
metadata.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
rT�����I�1�h�� 5�r�7��ý4��=N�;o��F����_�sf�����<���U���s|�$��8��@�0D�myh�)����l��Gr1��_���Z)1�N��A"�Zh߽
|
2
|
+
����Τ�mڠD��O�`��S�^��'(�233k�=#�U�A;�T���3��(�Ipqt�,=��s�.�h����+\5(�|9Jr���>�W,��jj�8�_<��������q�e����o�]�0ft�
|