History

String#remove! returns self in Rails 4.2

Thibaut committed 11 years ago

Commit 18b772f1 parent e0556365 files · +5 −5Browse files

Unified · Split

5 files
  1. lib/docs/filters/core/clean_text.rb +1 −1
  2. lib/docs/filters/node/entries.rb +1 −1
  3. lib/docs/filters/postgresql/entries.rb +1 −1
  4. lib/docs/filters/rdoc/entries.rb +1 −1
  5. lib/docs/filters/xpath/entries.rb +1 −1
lib/docs/filters/core/clean_text.rb+1−1
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
44
55 def call
66 html.strip!
7− while html.remove!(EMPTY_NODES_RGX); end
7+ while html.gsub!(EMPTY_NODES_RGX, ''); end
88 html
99 end
1010 end
lib/docs/filters/node/entries.rb+1−1
@@ -54,7 +54,7 @@ module Docs · 53 unmodified lines
5454 end
5555
5656 # Classes
57− if name.remove! 'Class: '
57+ if name.gsub! 'Class: ', ''
5858 name.remove! 'events.' # EventEmitter
5959 klass = name
6060 entries << [name, node['id']]
lib/docs/filters/postgresql/entries.rb+1−1
@@ -129,7 +129,7 @@ module Docs · 128 unmodified lines
129129 end
130130
131131 def additional_entry_prefix
132− type.dup.remove!('Functions: ') || self.name
132+ type.dup.gsub!('Functions: ', '') || self.name
133133 end
134134
135135 def skip_additional_entries?
lib/docs/filters/rdoc/entries.rb+1−1
@@ -11,7 +11,7 @@ module Docs · 10 unmodified lines
1111 def get_type
1212 type = name.dup
1313
14− unless type.remove! %r{::.*\z}
14+ unless type.gsub! %r{::.*\z}, ''
1515 parent = at_css('.meta-parent').try(:content).to_s
1616 return 'Errors' if type.end_with?('Error') || parent.end_with?('Error') || parent.end_with?('Exception')
1717 end
lib/docs/filters/xpath/entries.rb+1−1
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
44 def get_name
55 name = super
66 name.remove!('Axes.')
7− name << '()' if name.remove!('Functions.')
7+ name << '()' if name.gsub!('Functions.', '')
88 name
99 end
1010