Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'release/2.3.1' into develop

  • Loading branch information...
commit 0a2fd5032c97639224ea311809e83ccd7dfdc826 2 parents e00b068 + 097c4f5
@benlangfeld authored
View
2  CHANGELOG.md
@@ -1,4 +1,6 @@
# [develop](https://github.com/benlangfeld/ruby_speech)
+
+# [2.3.1](https://github.com/benlangfeld/ruby_speech/compare/v2.3.0...v2.3.1) - [2014-02-24](https://rubygems.org/gems/ruby_speech/versions/2.3.1)
* Bugfix: Phone number grammar should only allow a single instance of '*'/'x'
* Bugfix: Concatenating documents containing strings across the border inserts appropriate spacing (#21).
View
9 lib/ruby_speech/generic_element.rb
@@ -105,17 +105,16 @@ def +(other)
new_doc = Nokogiri::XML::Document.new
self.class.new(new_doc).tap do |new_element|
new_doc.root = new_element.node
+ string_types = [String, Nokogiri::XML::Text]
+ include_spacing = string_types.include?(self.nokogiri_children.last.class) && string_types.include?(other.nokogiri_children.first.class)
if Nokogiri.jruby?
new_element.add_child self.clone.nokogiri_children
- new_element << " "
+ new_element << " " if include_spacing
new_element.add_child other.clone.nokogiri_children
else
# TODO: This is yucky because it requires serialization
new_element.add_child self.nokogiri_children.to_xml
- string_types = [String, Nokogiri::XML::Text]
- if string_types.include?(self.nokogiri_children.last.class) && string_types.include?(other.nokogiri_children.first.class)
- new_element << " "
- end
+ new_element << " " if include_spacing
new_element.add_child other.nokogiri_children.to_xml
end
end
View
2  lib/ruby_speech/version.rb
@@ -1,3 +1,3 @@
module RubySpeech
- VERSION = "2.3.0"
+ VERSION = "2.3.1"
end
Please sign in to comment.
Something went wrong with that request. Please try again.