[cairo-commit] rcairo/samples text2.rb,1.8,1.9

Kouhei Sutou commit at pdx.freedesktop.org
Mon Mar 31 16:44:53 PDT 2008


Committed by: kou

Update of /cvs/cairo/rcairo/samples
In directory kemper:/tmp/cvs-serv27844/samples

Modified Files:
	text2.rb 
Log Message:
* samples/text2.rb: don't use block variable assignment.


Index: text2.rb
===================================================================
RCS file: /cvs/cairo/rcairo/samples/text2.rb,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- text2.rb	16 Apr 2007 07:31:43 -0000	1.8
+++ text2.rb	31 Mar 2008 23:48:52 -0000	1.9
@@ -19,14 +19,20 @@
   options.fade_out = false
 
   opts = OptionParser.new do |opts|
-    opts.on("--width=WIDTH", Integer, "paper width") {|options.width|}
-    opts.on("--height=HEIGHT", Integer, "paper height") {|options.height|}
+    opts.on("--width=WIDTH", Integer, "paper width") do |width|
+      options.width = width
+    end
+    opts.on("--height=HEIGHT", Integer, "paper height") do |height|
+      options.height = height
+    end
     opts.on("--font-description=DESCRIPTION",
             "font description (e.g. 'Monospace 14')") do |desc|
       options.font_description = desc
     end
     opts.on("--[no-]fade-out",
-            "fade-out one-third of page") {|options.fade_out|}
+            "fade-out one-third of page") do |fade_out|
+      options.fade_out = fade_out
+    end
   end
 
   opts.parse!(args)



More information about the cairo-commit mailing list