[packages/ruby-syntax] add infinitive loop fix from fedora

glen glen at pld-linux.org
Thu Apr 25 23:25:44 CEST 2013


commit a272ac11ad016865940375ed19ab82327db8c449
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri Apr 26 00:25:04 2013 +0300

    add infinitive loop fix from fedora
    
    otherwise tests run forever and probably do so in real use too

 ruby-syntax.spec                                 |  2 ++
 rubygem-syntax-fix-yaml-parse-for-ruby-1.9.patch | 11 +++++++++++
 2 files changed, 13 insertions(+)
---
diff --git a/ruby-syntax.spec b/ruby-syntax.spec
index d969ba9..e7c6da9 100644
--- a/ruby-syntax.spec
+++ b/ruby-syntax.spec
@@ -12,6 +12,7 @@ License:	Public Domain
 Group:		Development/Languages
 Source0:	http://gems.rubyforge.org/gems/%{pkgname}-%{version}.gem
 # Source0-md5:	d9d2eabc03bc937adfa00e35f228f9a8
+Patch0:		rubygem-syntax-fix-yaml-parse-for-ruby-1.9.patch
 URL:		http://syntax.rubyforge.org/
 BuildRequires:	rpm-rubyprov
 BuildRequires:	rpmbuild(macros) >= 1.656
@@ -29,6 +30,7 @@ Klasy składni do opisu gramatyk typu BNF w języku Ruby.
 
 %prep
 %setup -q -n %{pkgname}-%{version}
+%patch0 -p0
 
 %build
 %if %{with tests}
diff --git a/rubygem-syntax-fix-yaml-parse-for-ruby-1.9.patch b/rubygem-syntax-fix-yaml-parse-for-ruby-1.9.patch
new file mode 100644
index 0000000..707192a
--- /dev/null
+++ b/rubygem-syntax-fix-yaml-parse-for-ruby-1.9.patch
@@ -0,0 +1,11 @@
+--- lib/syntax/lang/yaml.rb.orig	2012-01-31 15:07:34.533346064 +0100
++++ lib/syntax/lang/yaml.rb	2012-01-31 15:06:26.365562358 +0100
+@@ -62,7 +62,7 @@
+             start_group :string
+             loop do
+               line = check_until(/[\n\r]|\Z/)
+-              break if line.nil?
++              break if line.nil? or line.empty?
+               if line.chomp.length > 0
+                 this_indent = line.chomp.match( /^\s*/ )[0]
+                 break if this_indent.length < indent.length
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-syntax.git/commitdiff/a272ac11ad016865940375ed19ab82327db8c449



More information about the pld-cvs-commit mailing list