[ruby-racc] Change String#map to str.lines.map (in ruby 1.9) in racc

Mamoru Tasaka mtasaka at fedoraproject.org
Tue Jan 24 10:17:33 UTC 2012


commit 35899b1a0c045747a50c05e8d816d23e790ae932
Author: TASAKA Mamoru <mtasaka at localhost.localdomain>
Date:   Tue Jan 24 19:17:30 2012 +0900

    Change String#map to str.lines.map (in ruby 1.9) in racc

 ruby-racc-1.4.5-map.patch |   11 +++++++++++
 ruby-racc.spec            |   10 +++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/ruby-racc-1.4.5-map.patch b/ruby-racc-1.4.5-map.patch
new file mode 100644
index 0000000..73c0ebd
--- /dev/null
+++ b/ruby-racc-1.4.5-map.patch
@@ -0,0 +1,11 @@
+--- ./bin/racc.orig	2012-01-24 19:08:57.272551712 +0900
++++ ./bin/racc	2012-01-24 19:09:09.288933209 +0900
+@@ -96,7 +96,7 @@
+ end
+ 
+ def get_options
+-  gl_args = Racc_Options.map {|line|
++  gl_args = Racc_Options.lines.map {|line|
+               next if line.strip.empty?
+               disp, sopt, lopt, takearg, doc = line.strip.split(/\s+/, 5)
+               a = []
diff --git a/ruby-racc.spec b/ruby-racc.spec
index e4f1940..9d8e8cf 100644
--- a/ruby-racc.spec
+++ b/ruby-racc.spec
@@ -4,9 +4,11 @@
 Summary: LALR(1) Parser Generator
 Name: ruby-%{rname}
 Version: 1.4.5
-Release: 8%{?dist}
+Release: 9%{?dist}
 URL: http://i.loveruby.net/en/racc.html
 Source0: http://i.loveruby.net/archive/racc/%{rname}-%{version}-all.tar.gz
+# String#map no longer exists on ruby 1.9
+Patch0:	  ruby-racc-1.4.5-map.patch
 License: LGPLv2
 Group: Development/Tools
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -23,6 +25,9 @@ Now almost all functions of yacc are implemented.
 
 %prep
 %setup -q -n %{rname}-%{version}-all 
+pushd packages/racc
+%patch0 -p1
+popd
 
 %build
 ruby setup.rb config --bin-dir=%{_bindir} --rb-dir=%{ruby_vendorlibdir} --with=racc
@@ -48,6 +53,9 @@ rm -rf %buildroot
 %doc packages/racc/COPYING README.* packages/racc/NEWS.* packages/racc/doc.*
 
 %changelog
+* Tue Jan 24 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.4.5-9
+- Change String#map to str.lines.map (in ruby 1.9) in racc
+
 * Tue Jan 24 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.4.5-8
 - Rebuild against ruby 19
 


More information about the scm-commits mailing list