Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] [PATCH] Return nothing between if end index is not found.
@ 2010-07-18 17:53 Edward Z. Yang
  2010-07-19 22:50 ` Michael Stapelberg
  0 siblings, 1 reply; 12+ messages in thread
From: Edward Z. Yang @ 2010-07-18 17:53 UTC (permalink / raw)
  To: sup-devel

This patch fixed Nil error that occurred when I had a GPG signed
mail with a starting marker but no ending marker.

From 22d12ffe7caa0d11c91876e2c8c7806854d0b3ab Mon Sep 17 00:00:00 2001
From: Edward Z. Yang <ezyang@mit.edu>
Date: Sun, 18 Jul 2010 03:38:52 -0400
Subject: [PATCH] Return nothing between if end index is not found.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
---
 lib/sup/util.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/sup/util.rb b/lib/sup/util.rb
index d19caca..dad479f 100644
--- a/lib/sup/util.rb
+++ b/lib/sup/util.rb
@@ -479,6 +479,7 @@ module Enumerable
 
   ## returns all the entries which are equal to startline up to endline
   def between startline, endline
+    return [] if not index(endline)
     select { |l| true if l == startline .. l == endline }
   end
 end
-- 
1.7.0.4
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-07-18 17:53 [sup-devel] [PATCH] Return nothing between if end index is not found Edward Z. Yang
@ 2010-07-19 22:50 ` Michael Stapelberg
  2010-07-20 20:09   ` Michael Stapelberg
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Stapelberg @ 2010-07-19 22:50 UTC (permalink / raw)
  To: sup-devel

Hi Edward,

Excerpts from Edward Z. Yang's message of 2010-07-18 19:53:39 +0200:
> This patch fixed Nil error that occurred when I had a GPG signed
> mail with a starting marker but no ending marker.
Thanks for the patch, I can confirm it working and necessary.

Best regards,
Michael
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-07-19 22:50 ` Michael Stapelberg
@ 2010-07-20 20:09   ` Michael Stapelberg
  2010-08-15 23:30     ` Edward Z. Yang
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Stapelberg @ 2010-07-20 20:09 UTC (permalink / raw)
  To: sup-devel

Hi,

Excerpts from Michael Stapelberg's message of 2010-07-20 00:50:37 +0200:
> Thanks for the patch, I can confirm it working and necessary.
I was wrong. I just opened an email and it was no longer verified (it is
GPG-signed). I will post an updated patch soon.

Best regards,
Michael
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-07-20 20:09   ` Michael Stapelberg
@ 2010-08-15 23:30     ` Edward Z. Yang
  2010-08-16  1:19       ` Michael Stapelberg
  0 siblings, 1 reply; 12+ messages in thread
From: Edward Z. Yang @ 2010-08-15 23:30 UTC (permalink / raw)
  To: Michael Stapelberg; +Cc: sup-devel

Excerpts from Michael Stapelberg's message of Tue Jul 20 16:09:39 -0400 2010:
> I was wrong. I just opened an email and it was no longer verified (it is
> GPG-signed). I will post an updated patch soon.

Hi Michael,

I was hoping to get a copy of the email that broke for you, but it never
found its way to me. Perhaps you could resend it?

Thanks,
Edward
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-08-15 23:30     ` Edward Z. Yang
@ 2010-08-16  1:19       ` Michael Stapelberg
  2010-08-16  1:40         ` Edward Z. Yang
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Stapelberg @ 2010-08-16  1:19 UTC (permalink / raw)
  To: Edward Z. Yang; +Cc: sup-devel

Hi Edward,

Excerpts from Edward Z. Yang's message of 2010-08-16 01:30:46 +0200:
> I was hoping to get a copy of the email that broke for you, but it never
> found its way to me. Perhaps you could resend it?
Just did so. Message-ID is <1281921493-sup-9947@midna.zekjur.net>.

Best regards,
Michael
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-08-16  1:19       ` Michael Stapelberg
@ 2010-08-16  1:40         ` Edward Z. Yang
  2010-08-16 16:27           ` Alvaro Herrera
  2010-08-16 17:22           ` Michael Stapelberg
  0 siblings, 2 replies; 12+ messages in thread
From: Edward Z. Yang @ 2010-08-16  1:40 UTC (permalink / raw)
  To: Michael Stapelberg; +Cc: sup-devel

Excerpts from Michael Stapelberg's message of Sun Aug 15 21:19:35 -0400 2010:
> Just did so. Message-ID is <1281921493-sup-9947@midna.zekjur.net>.

What's the subject line?

Edward
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-08-16  1:40         ` Edward Z. Yang
@ 2010-08-16 16:27           ` Alvaro Herrera
  2010-08-16 17:22           ` Michael Stapelberg
  1 sibling, 0 replies; 12+ messages in thread
From: Alvaro Herrera @ 2010-08-16 16:27 UTC (permalink / raw)
  To: Edward Z. Yang; +Cc: sup-devel

Excerpts from Edward Z. Yang's message of dom ago 15 21:40:33 -0400 2010:
> Excerpts from Michael Stapelberg's message of Sun Aug 15 21:19:35 -0400 2010:
> > Just did so. Message-ID is <1281921493-sup-9947@midna.zekjur.net>.
> 
> What's the subject line?

So it kinda sucks that one can't search for a message by Message-Id, eh?.
I have a lot of need for that functionality, since the whole PostgreSQL
patch management workflow is based on them.

-- 
Álvaro Herrera <alvherre@alvh.no-ip.org>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-08-16  1:40         ` Edward Z. Yang
  2010-08-16 16:27           ` Alvaro Herrera
@ 2010-08-16 17:22           ` Michael Stapelberg
  2010-08-16 19:55             ` Edward Z. Yang
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Stapelberg @ 2010-08-16 17:22 UTC (permalink / raw)
  To: Edward Z. Yang; +Cc: sup-devel

Hi Edward,

Excerpts from Edward Z. Yang's message of 2010-08-16 03:40:33 +0200:
> What's the subject line?
The subject line is:
"Fwd: Fwd: Re: [RaumZeitLabor] Portalroboter kostenlos bei Selbstabholung - Interesse?"

Best regards,
Michael
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-08-16 17:22           ` Michael Stapelberg
@ 2010-08-16 19:55             ` Edward Z. Yang
  2010-08-17 22:46               ` Michael Stapelberg
  0 siblings, 1 reply; 12+ messages in thread
From: Edward Z. Yang @ 2010-08-16 19:55 UTC (permalink / raw)
  To: Michael Stapelberg; +Cc: sup-devel

Excerpts from Michael Stapelberg's message of Mon Aug 16 13:22:26 -0400 2010:
> Hi Edward,
> 
> Excerpts from Edward Z. Yang's message of 2010-08-16 03:40:33 +0200:
> > What's the subject line?
> The subject line is:
> "Fwd: Fwd: Re: [RaumZeitLabor] Portalroboter kostenlos bei Selbstabholung - Interesse?"

Fascinatingly enough, I cannot find it in either my inbox or my spam filter. (Dun dun dun.)
Maybe you should send it as an attachment.

Edward
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-08-16 19:55             ` Edward Z. Yang
@ 2010-08-17 22:46               ` Michael Stapelberg
  2010-09-09 16:55                 ` Edward Z. Yang
  2010-09-09 19:08                 ` Kevin Riggle
  0 siblings, 2 replies; 12+ messages in thread
From: Michael Stapelberg @ 2010-08-17 22:46 UTC (permalink / raw)
  To: Edward Z. Yang; +Cc: sup-devel

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

Hi Edward,

Excerpts from Edward Z. Yang's message of 2010-08-16 21:55:32 +0200:
> Fascinatingly enough, I cannot find it in either my inbox or my spam filter. (Dun dun dun.)
> Maybe you should send it as an attachment.
Interesting. I gzipped it (to make sure it does not get touched in any way on
its way to you) and attached it to this mail.

Best regards,
Michael

[-- Attachment #2: fwd.gz --]
[-- Type: application/x-gzip, Size: 3130 bytes --]

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-08-17 22:46               ` Michael Stapelberg
@ 2010-09-09 16:55                 ` Edward Z. Yang
  2010-09-09 19:08                 ` Kevin Riggle
  1 sibling, 0 replies; 12+ messages in thread
From: Edward Z. Yang @ 2010-09-09 16:55 UTC (permalink / raw)
  To: Michael Stapelberg; +Cc: kevinr, sup-devel

Excerpts from Michael Stapelberg's message of Tue Aug 17 18:46:32 -0400 2010:
> Interesting. I gzipped it (to make sure it does not get touched in any way on
> its way to you) and attached it to this mail.

I finally got around to looking at your message, and as expected, it appears
that there is no trailing END PGP MESSAGE block, which is why my patch breaks
your behavior (it claims there is no valid PGP block.)

Regardless of what the PGP standard says, I suppose it's good practice
to be liberal in what we accept.  So the correct change might be to
keep the existing semantics of between (documenting carefully what happens
if the ending line is not present) and then fixing the code that relies
on the bogus invariant.

This also resolves Kevin Riggle’s issue.

Cheers,
Edward
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [sup-devel] [PATCH] Return nothing between if end index is not found.
  2010-08-17 22:46               ` Michael Stapelberg
  2010-09-09 16:55                 ` Edward Z. Yang
@ 2010-09-09 19:08                 ` Kevin Riggle
  1 sibling, 0 replies; 12+ messages in thread
From: Kevin Riggle @ 2010-09-09 19:08 UTC (permalink / raw)
  To: sup-devel

Excerpts from Michael Stapelberg's message of Tue Aug 17 18:46:32 -0400 2010:
> Hi Edward,
> 
> Excerpts from Edward Z. Yang's message of 2010-08-16 21:55:32 +0200:
> > Fascinatingly enough, I cannot find it in either my inbox or my spam filter. (Dun dun dun.)
> > Maybe you should send it as an attachment.
> Interesting. I gzipped it (to make sure it does not get touched in any way on
> its way to you) and attached it to this mail.
> 
These days GMail, at least, will look inside your gzipped attachments and will 
block attachments containing binaries.  Now, if you'd PGP-encrypted it.....

- Kevin
--
Kevin Riggle (kevinr@free-dissociation.com) 
http://free-dissociation.com
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-09-09 19:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-18 17:53 [sup-devel] [PATCH] Return nothing between if end index is not found Edward Z. Yang
2010-07-19 22:50 ` Michael Stapelberg
2010-07-20 20:09   ` Michael Stapelberg
2010-08-15 23:30     ` Edward Z. Yang
2010-08-16  1:19       ` Michael Stapelberg
2010-08-16  1:40         ` Edward Z. Yang
2010-08-16 16:27           ` Alvaro Herrera
2010-08-16 17:22           ` Michael Stapelberg
2010-08-16 19:55             ` Edward Z. Yang
2010-08-17 22:46               ` Michael Stapelberg
2010-09-09 16:55                 ` Edward Z. Yang
2010-09-09 19:08                 ` Kevin Riggle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox