History

Use String#remove

Thibaut committed 12 years ago

Commit bcd4a5b1 parent a0b795934 files · +79 −79Browse files

Showing the changes to lib/docs/filters/javascript (1 of 34 files). Show all

Unified · Split

lib/docs/filters/javascript/entries.rb+4−4
@@ -19,9 +19,9 @@ module Docs · 18 unmodified lines
19 name19 name
20 else20 else
21 name = super21 name = super
22 name.sub! 'Functions and function scope.', ''22 name.remove! 'Functions and function scope.'
23 name.sub! 'Operators.', ''23 name.remove! 'Operators.'
24 name.sub! 'Statements.', ''24 name.remove! 'Statements.'
25 name25 name
26 end26 end
27 end27 end
@@ -34,7 +34,7 @@ module Docs · 6 unmodified lines
34 elsif slug.start_with? 'Functions_and_function_scope'34 elsif slug.start_with? 'Functions_and_function_scope'
35 'Function'35 'Function'
36 elsif slug.start_with? 'Global_Objects'36 elsif slug.start_with? 'Global_Objects'
37 object, method = *slug.sub('Global_Objects/', '').split('/')37 object, method = *slug.remove('Global_Objects/').split('/')
38 if object.end_with? 'Error'38 if object.end_with? 'Error'
39 'Errors'39 'Errors'
40 elsif INTL_OBJECTS.include?(object)40 elsif INTL_OBJECTS.include?(object)