[#93964] perl6 grammar rules in ruby — Charles Comstock <cc1@...>

Has anyone taken a look at the idea of having embedded grammars in ruby

21 messages 2004/03/01

[#94023] Why's (Poignant) Guide to Ruby, Chapter Four: Little Leaves of Code — why the lucky stiff <ruby-talk@...>

Just wanted everyone to know that Chapter Four of the (Poignant) Guide

15 messages 2004/03/01

[#94037] Rubyx OS (Ruby oriented linux distro) — Andrew Walrond <andrew@...>

I am pleased to announce the first public release of Rubyx, codename

39 messages 2004/03/02

[#94062] pickaxe with pics? — Dick Davies <rasputnik@...>

17 messages 2004/03/02

[#94068] dynamic assignment of instance variables — gv@... (Gerard A.W. Vreeswijk)

$ cat try.rb

19 messages 2004/03/02

[#94110] why are Hashes so unsorted? what's your solution? — Ruby Baby <ruby@...>

I try to avoid questions like "Why doesn't Ruby do what ___ does?"

14 messages 2004/03/03

[#94144] Mozilla gets support for other client-side languages in the future, how about Ruby? — Erik Terpstra <erik@...>

Interesting slides:

9 messages 2004/03/03

[#94190] rescue inside block -> syntax error — Simon Strandgaard <neoneye@...>

While reading this message:

15 messages 2004/03/04

[#94424] random range — Charles Comstock <cc1@...>

Why doesn't rand take an integer range and then generate a random number

23 messages 2004/03/06
[#94432] Re: random range — Hal Fulton <hal9000@...> 2004/03/06

Charles Comstock wrote:

[#94434] Re: random range — Joel VanderWerf <vjoel@...> 2004/03/06

Hal Fulton wrote:

[#94436] Re: random range — "David A. Black" <dblack@...> 2004/03/06

Hi --

[#94487] Looking for HTML templating system — Andreas Schwarz <usenet@...>

I am looking for a templating system for my forum

19 messages 2004/03/07

[#94517] proposal: class<<obj to invoke extend_object — Simon Strandgaard <neoneye@...>

'obj.extend' and 'class<<obj' are close cousins..

22 messages 2004/03/07

[#94612] RedCloth 2.0.2 -- A Textile Humane Web Text Generator — why the lucky stiff <ruby-talk@...>

For your immediate perusal and swift renouncement:

10 messages 2004/03/09

[#94672] saving array — mopthisandthat@... (Phidippus)

After I do bunch of computations and create a huge array with bunch of

18 messages 2004/03/10

[#94686] Possibility of 2nd edition of _The Ruby Way_ — Hal Fulton <hal9000@...>

Hello, all.

17 messages 2004/03/10

[#94760] convincing a webhost to support ruby — Mark Hubbart <discord@...>

Hi all,

15 messages 2004/03/11

[#94813] Jruby 0.7.0 — Thomas E Enebo <enebo@...>

20 messages 2004/03/12
[#94815] Re: [ANN] Jruby 0.7.0 — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com> 2004/03/12

il Sat, 13 Mar 2004 02:33:49 +0900, Thomas E Enebo <enebo@acm.org> ha

[#94817] Re: [ANN] Jruby 0.7.0 — Thomas E Enebo <enebo@...> 2004/03/12

On Sat, 13 Mar 2004, gabriele renzi defenestrated me:

[#94935] RubyGems 0.2.0 — Chad Fowler <chad@...>

The first public release of RubyGems (http://rubygems.rubyforge.org)

26 messages 2004/03/14

[#94985] GUI testing on unix — Simon Strandgaard <neoneye@...>

I am curious to if there exists any GUI testing packages for unix.

17 messages 2004/03/16

[#94998] RAA trouble and maintenance — "NAKAMURA, Hiroshi" <nahi@...>

Hi,

14 messages 2004/03/16

[#95014] RAA - So much is broken — Lothar Scholz <mailinglists@...>

Hello,

15 messages 2004/03/16

[#95060] YAML tutorial — Matt Lawrence <matt@...>

Ok, I am so not a Ruby wizard. In fact, I don't do much development at

15 messages 2004/03/17

[#95098] groovy — David Garamond <lists@...6.isreserved.com>

Groovy, a scripting language targeted for JVM, was mentioned in Slashdot

14 messages 2004/03/17

[#95155] Installer packages for MacOSX — Mark Hubbart <discord@...>

Hi, all

18 messages 2004/03/17

[#95190] Thinking about a date-matching algorithm... — Hal Fulton <hal9000@...>

I did a little swapping of ideas with dblack on this. Now I'm

22 messages 2004/03/18

[#95200] Log4r 1.0.5 now with RubyGems option — Leon Torres <leon@...>

Greetings, I'm pleased to announce the release of Log4r 1.0.5. The

11 messages 2004/03/18

[#95230] Ruby and Mozilla — paul vudmaska <paul@...>

--- Simon Strandgaard <neoneye@adslhome.dk <http://us.f104.mail.yahoo.com/ym/Compose?To=neoneye@adslhome.dk&YY=90525&order=down&sort=date&pos=0&view=a&head=b>> wrote:

12 messages 2004/03/18

[#95290] calling outer-scope method of same name — "Bill Kelly" <billk@...>

Hi all!

16 messages 2004/03/18
[#95292] Re: calling outer-scope method of same name — "David A. Black" <dblack@...> 2004/03/18

Hi --

[#95340] Kwartz (2004-03-19) released — Makoto Kuwata <kwa@...>

Hi folks,

31 messages 2004/03/19
[#95367] Re: [ANN] Kwartz (2004-03-19) released — Andreas Schwarz <usenet@...> 2004/03/19

Hi,

[#95405] Re: [ANN] Kwartz (2004-03-19) released — Andreas Schwarz <usenet@...> 2004/03/19

Makoto Kuwata wrote:

[#95412] Re: [ANN] Kwartz (2004-03-19) released — Makoto Kuwata <kwa@...> 2004/03/19

Andreas,

[#95453] Re: [ANN] Kwartz (2004-03-19) released — Andreas Schwarz <usenet@...> 2004/03/20

Makoto Kuwata wrote:

[#95484] Re: [ANN] Kwartz (2004-03-19) released — Makoto Kuwata <kwa@...> 2004/03/21

[#95490] Re: [ANN] Kwartz (2004-03-19) released — Thomas Fini Hansen <beast@...> 2004/03/21

On Sun, Mar 21, 2004 at 11:39:26AM +0900, Makoto Kuwata wrote:

[#95518] Re: [ANN] Kwartz (2004-03-19) released — Andreas Schwarz <usenet@...> 2004/03/21

Makoto Kuwata wrote:

[#95553] Re: [ANN] Kwartz (2004-03-19) released — Andreas Schwarz <usenet@...> 2004/03/22

Makoto Kuwata wrote:

[#95386] Can $LOAD_PATH be relative? — ptkwt@... (Phil Tomson)

24 messages 2004/03/19
[#95389] Re: Can $LOAD_PATH be relative? — ptkwt@... (Phil Tomson) 2004/03/19

In article <wsqk71gd188.fsf@io.com>, Jim Menard <jimm@io.com> wrote:

[#95398] Re: Can $LOAD_PATH be relative? — Patrick Bennett <patrick.bennett@...> 2004/03/19

Phil Tomson wrote:

[#95400] Re: Can $LOAD_PATH be relative? — "David A. Black" <dblack@...> 2004/03/19

Hi --

[#95403] Re: Can $LOAD_PATH be relative? — Patrick Bennett <patrick.bennett@...> 2004/03/19

[#95434] converting javascript to ruby (nested methods) — yvon.thoravalNO-SPAM@... (Yvon Thoraval)

i have a script written in javascript and want to translate it into ruby

10 messages 2004/03/20

[#95517] What to gem? — Robert Feldt <feldt@...>

Hi,

14 messages 2004/03/21

[#95560] Need some advice on PickAxe II — Dave Thomas <dave@...>

Folks:

74 messages 2004/03/22

[#95636] Tempfile consuming a lot of memory — thomass@... (Thomas)

I'm using a lot of Tempfile's and I have been made aware that they

17 messages 2004/03/23

[#95693] proposal - enforce lower_case for variables and methods — Simon Strandgaard <neoneye@...>

Ruby does already enforce CamelCase for class/modules.

29 messages 2004/03/24

[#95769] File.stat.size errors with file sizes over 2Gigs. — walter@...

File.stat('file_name').size returns erroneous file sizes when the

16 messages 2004/03/24

[#95782] Quick Introduction to RubyGems — Gavin Sinclair <gsinclair@...>

Hi folks,

17 messages 2004/03/24

[#95875] Errors with "make" step, while compiling ruby under AIX 5.2 — Ruby Ruby <ruby4lover@...>

I am wanted to install ruby 1.8.1 under AIX 5.2. During the installation, while doing the "make" part of it, the process abruptily ended with the following errors:

15 messages 2004/03/25
[#95883] Re: Errors with "make" step, while compiling ruby under AIX 5.2 — nobu.nokada@... 2004/03/26

Hi,

[#95918] Re: Errors with "make" step, while compiling ruby under AIX 5.2 — Ruby Ruby <ruby4lover@...> 2004/03/26

I am sorry to insist but this is important to me.

[#95960] Status of AOP in Ruby — Markus Jais <markusjais@...>

Hello

22 messages 2004/03/27

[#95984] deciding between ruby and python — "Serve Lau" <ik@...>

I'm trying to decide to learn either python or ruby. Are there fundamental

119 messages 2004/03/28
[#96006] Re: deciding between ruby and python — klausm0762@... (Klaus Momberger) 2004/03/28

"Serve Lau" <ik@detongiser.com> wrote in message news:<106dlen5mr97q76@corp.supernews.com>...

[#96566] Re: deciding between ruby and python — Ville Vainio <ville@...> 2004/04/05

[#96503] Re: deciding between ruby and python — Ville Vainio <ville@...> 2004/04/04

>>>>> "James" == James Britt <jamesUNDERBARb@neurogami.com> writes:

[#96508] Re: deciding between ruby and python — Dan Doel <djd15@...> 2004/04/04

As you say, this whole thread has been done many times before.

[#96691] Re: deciding between ruby and python — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com> 2004/04/07

il Wed, 07 Apr 2004 05:35:39 GMT, dagbrown@LART.ca (Dave Brown) ha

[#95992] Madeleine 0.6 — Anders Bengtsson <ndrsbngtssn@...>

23 messages 2004/03/28

[PATCH] rubyzip on extra bytes.

From: nobu.nokada@...
Date: 2004-03-27 09:12:35 UTC
List: ruby-talk #95947
Hi,

I found rubyzip 0.5.4 fails on a zip file with with extra
bytes, e.g., some virus attachments.  Yes, it would be an
incorrect file, but who can expect correct behaviors from virus
kiddies?

  $ zipinfo -1 textfile.zip
  textfile.htm.exe

  $ ruby-1.8 -Irubyzip -rzip/zip -e 'Zip::ZipFile.foreach(ARGV[0]){|n|p n.name}' textfile.zip
  "textfile.htm.exe"

  $ zipinfo -1 photos.zip
  warning [photos.zip]:  2 extra bytes at beginning or within zipfile
    (attempting to process anyway)
  photos.jpg.exe

  $ ruby-1.8 -Irubyzip -rzip/zip -e 'Zip::ZipFile.foreach(ARGV[0]){|n|p n.name}' photos.zip
  ./rubyzip/zip/zip.rb:717:in `dup': can't dup NilClass (TypeError)
  	from ./rubyzip/zip/zip.rb:717:in `dup'
  	from ./rubyzip/zip/zip.rb:717:in `map'
  	from ./rubyzip/zip/zip.rb:717:in `dup'
  	from ./rubyzip/zip/zip.rb:874:in `initialize'
  	from ./rubyzip/zip/zip.rb:878:in `new'
  	from ./rubyzip/zip/zip.rb:878:in `open'
  	from ./rubyzip/zip/zip.rb:893:in `foreach'
  	from -e:1

And ::VERSION constant has been obsolete already and is no
longer provided in 1.9.

  $ ruby-1.9 -Irubyzip -rzip/zip -e 0
  ./rubyzip/zip/zip.rb:20: uninitialized constant Zip::VERSION (NameError)

Also, only zip/ioextras.rb has CR+LF line codes.


diff -ru2pw zip/ioextras.rb zip.new/ioextras.rb
--- zip/ioextras.rb	2004-03-17 02:20:27.000000000 +0900
+++ zip.new/ioextras.rb	2004-03-27 17:55:10.000000000 +0900
@@ -1,5 +1,2 @@
-#!/usr/bin/env ruby
-
-
 module IOExtras
   module FakeIO
diff -ru2pw zip/stdrubyext.rb zip.new/stdrubyext.rb
--- zip/stdrubyext.rb	2004-01-31 00:07:56.000000000 +0900
+++ zip.new/stdrubyext.rb	2004-03-27 17:53:24.000000000 +0900
@@ -1,3 +1,3 @@
-unless Enumerable.instance_methods(true).include?("inject")
+unless Enumerable.method_defined?(:inject)
   module Enumerable  #:nodoc:all
     def inject(n = 0)
@@ -16,5 +16,5 @@ module Enumerable #:nodoc:all
 end
 
-unless Object.instance_methods(true).include?("object_id")
+unless Object.method_defined?(:object_id)
   class Object
     # Using object_id which is the new thing, so we need
@@ -35,10 +35,9 @@ end
 class String
   def starts_with(aString)
-    slice(0, aString.size) == aString
+    rindex(aString.size, 0)
   end
 
   def ends_with(aString)
-    aStringSize = aString.size
-    slice(-aStringSize, aStringSize) == aString 
+    index(aString, -aString.size)
   end
 
diff -ru2pw zip/zip.rb zip.new/zip.rb
--- zip/zip.rb	2004-03-26 00:34:43.000000000 +0900
+++ zip.new/zip.rb	2004-03-27 17:54:47.000000000 +0900
@@ -1,7 +1,5 @@
-#!/usr/bin/env ruby
-
 require 'delegate'
 require 'singleton'
-require 'zip/tempfile_bugfixed'
+require 'tempfile'
 require 'ftools'
 require 'zlib'
@@ -10,4 +8,9 @@ require 'zip/ioextras'
 
 
+if Tempfile.superclass == SimpleDelegator
+  require 'zip/tempfile_bugfixed'
+  Tempfile = BugFix::Tempfile
+end
+
 module Zlib
   if ! const_defined? :MAX_WBITS
@@ -18,5 +21,5 @@ end
 module Zip
 
-  RUBY_MINOR_VERSION = VERSION.split(".")[1].to_i
+  RUBY_MINOR_VERSION = RUBY_VERSION.split(".")[1].to_i
 
   # Ruby 1.7.x compatibility
@@ -365,5 +368,5 @@ module Zip
     end
     
-    CENTRAL_DIRECTORY_ENTRY_SIGNATURE = 0x02014b50
+    CENTRAL_DIRECTORY_ENTRY_SIGNATURE = "PK\1\2".freeze
     CDIR_ENTRY_STATIC_HEADER_LENGTH = 46
     
@@ -374,4 +377,12 @@ module Zip
       end
       
+      unless cdirSignature = staticSizedFieldsBuf.index(CENTRAL_DIRECTORY_ENTRY_SIGNATURE)
+	raise ZipError, "Zip local header magic not found at location '#{localHeaderOffset}'"
+      end
+      if cdirSignature > 0
+        staticSizedFieldsBuf[0, cdirSignature] = ""
+        staticSizedFieldsBuf << io.read(cdirSignature)
+      end
+
       cdirSignature          ,
 	@version               , # version of encoding software
@@ -396,7 +407,4 @@ module Zip
 	@comment               = staticSizedFieldsBuf.unpack('VCCvvvvvVVVvvvvvVV')
 
-      unless (cdirSignature == CENTRAL_DIRECTORY_ENTRY_SIGNATURE)
-	raise ZipError, "Zip local header magic not found at location '#{localHeaderOffset}'"
-      end
       set_time(lastModDate, lastModTime)
       
@@ -1069,5 +1077,5 @@ module Zip
     
     def get_tempfile
-      tempFile = BugFix::Tempfile.new(File.basename(name), File.dirname(name))
+      tempFile = Tempfile.new(File.basename(name), File.dirname(name))
       tempFile.binmode
       tempFile
@@ -1119,5 +1127,5 @@ module Zip
     def initialize(entry)
       super(entry)
-      @tempFile = BugFix::Tempfile.new(File.basename(name), File.dirname(zipfile))
+      @tempFile = Tempfile.new(File.basename(name), File.dirname(zipfile))
       @tempFile.binmode
     end
diff -ru2pw zip/zipfilesystem.rb zip.new/zipfilesystem.rb
--- zip/zipfilesystem.rb	2004-01-31 00:07:56.000000000 +0900
+++ zip.new/zipfilesystem.rb	2004-03-27 17:54:39.000000000 +0900
@@ -1,4 +1,2 @@
-#!/usr/bin/env ruby
-
 require 'zip/zip'
 
diff -ru2pw zip/ziprequire.rb zip.new/ziprequire.rb
--- zip/ziprequire.rb	2003-08-21 22:54:33.000000000 +0900
+++ zip.new/ziprequire.rb	2004-03-27 17:54:30.000000000 +0900
@@ -1,4 +1,2 @@
-#!/usr/bin/env ruby
-
 require 'zip/zip'
 


-- 
Nobu Nakada

In This Thread

Prev Next