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 CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,11 @@
1
+ === 1.0.6 / 2011-01-27
2
+
3
+ * 1 minor enhancement
4
+
5
+ * Return of #unindent (out-of-place) should never be the original object
6
+ * bug fixed
7
+ * added test to ensure it will not return
8
+
1
9
  === 1.0.5 / 2011-01-27
2
10
 
3
11
  * 1 minor enhancement
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'hoe'
6
6
  Hoe.spec 'heredoc_unindent' do
7
7
  developer('Adriano Mitre', 'adriano.mitre@gmail.com')
8
8
 
9
- self.version = '1.0.5'
9
+ self.version = '1.0.6'
10
10
 
11
11
  self.readme_file = 'README.rdoc'
12
12
  self.history_file = 'History.rdoc'
@@ -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
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 5
9
- version: 1.0.5
8
+ - 6
9
+ version: 1.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Adriano Mitre
metadata.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- JZi�����yZDĕaKA5�-oF �����?V3hQ�Ź'GB[}����<�Dn��pQ�Α�rI��,W���-��oW�NPv��b9�
2
- Z��̡`� aE��A��=kƖ�!A7Y����/i��Q���
1
+ rT�����I�1h�� 5�r7��ý4��=N�;o��F����_sf�����<���U���s|�$��8��@�0D�myh�)����l��Gr1��_���Z)1N��A"�Zh߽
2
+ ����Τ�mڠD��O�`��S�^��'(�233k�=׼#�U�A;�T���3��(�Ipqt�,=��s�.�h����+\5(�|9Jr���>�W,��jj�8�_<��������q�e����o�]�0ft�