sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 6a88cfad209417cef169d4cb52a25d7d7071a7b5
parent 8a9f8761acc318f2bfb852480d6076dabb131825
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Tue,  8 Sep 2009 15:47:16 -0400

remove out-of-date comments about the hook system

Diffstat:
M lib/sup/hook.rb | 15 ---------------
M lib/sup/index.rb | 5 +----
2 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/lib/sup/hook.rb b/lib/sup/hook.rb
@@ -1,15 +1,6 @@
 module Redwood
 
 class HookManager
-  ## there's probably a better way to do this, but to evaluate a hook
-  ## with a bunch of pre-set "local variables" i define a function
-  ## per variable and then instance_evaluate the code.
-  ##
-  ## how does rails do it, when you pass :locals into a partial?
-  ##
-  ## i don't bother providing setters, since i'm pretty sure the
-  ## charade will fall apart pretty quickly with respect to scoping.
-  ## "fail-fast", we'll call it.
   class HookContext
     def initialize name
       @__say_id = nil
@@ -18,12 +9,6 @@ class HookManager
     end
 
     attr_writer :__locals
-
-    ## an annoying gotcha here is that if you try something
-    ## like var = var.foo(), var will magically get allocated
-    ## to Nil and method_missing will never get called.  You
-    ## can work around this by calling self.var or simply
-    ## not assigning it to itself.
     def method_missing m, *a
       case @__locals[m]
       when Proc
diff --git a/lib/sup/index.rb b/lib/sup/index.rb
@@ -28,10 +28,7 @@ class Index
 Executes before a string search is applied to the index,
 returning a new search string.
 Variables:
-  subs: The string being searched. Be careful about shadowing:
-    this variable is actually a method, so use a temporary variable
-    or explicitly call self.subs; the substitutions in index.rb
-    don't actually work.
+  subs: The string being searched.
 EOS
 
   ## these two accessors should ONLY be used by single-threaded programs.