From b16e4abdf6b11a3c1fc0e476c4257f029e26377e Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Mon, 6 Jun 2022 13:47:38 +0300 Subject: [PATCH] Fix RDoc for Element * Add missing plus for `Element#has_text?`. * Remove unneeded hash and duplicated `the` for `Element#text`. --- lib/rexml/element.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb index 4c21dbd5..bf913a82 100644 --- a/lib/rexml/element.rb +++ b/lib/rexml/element.rb @@ -989,7 +989,7 @@ def previous_element # :call-seq: # has_text? -> true or false # - # Returns +true if the element has one or more text noded, + # Returns +true+ if the element has one or more text noded, # +false+ otherwise: # # d = REXML::Document.new 'text' @@ -1006,7 +1006,7 @@ def has_text? # text(xpath = nil) -> text_string or nil # # Returns the text string from the first text node child - # in a specified element, if it exists, # +nil+ otherwise. + # in a specified element, if it exists, +nil+ otherwise. # # With no argument, returns the text from the first text node in +self+: # @@ -1014,7 +1014,7 @@ def has_text? # d.root.text.class # => String # d.root.text # => "some text " # - # With argument +xpath+, returns text from the the first text node + # With argument +xpath+, returns text from the first text node # in the element that matches +xpath+: # # d.root.text(1) # => "this is bold!"