]> git.pld-linux.org Git - packages/ruby-syntax.git/commitdiff
add infinitive loop fix from fedora master
authorElan Ruusamäe <glen@delfi.ee>
Thu, 25 Apr 2013 21:25:04 +0000 (00:25 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 25 Apr 2013 21:25:04 +0000 (00:25 +0300)
otherwise tests run forever and probably do so in real use too

ruby-syntax.spec
rubygem-syntax-fix-yaml-parse-for-ruby-1.9.patch [new file with mode: 0644]

index d969ba97f717b29f994941196481812690845014..e7c6da924480a509ddf5de91212954cddb31b211 100644 (file)
@@ -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 (file)
index 0000000..707192a
--- /dev/null
@@ -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
This page took 0.337858 seconds and 4 git commands to generate.