yahns Ruby server user/dev discussion
 help / color / Atom feed
* [PATCH] config: more descriptive variable name
@ 2017-04-03 19:56 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2017-04-03 19:56 UTC (permalink / raw)
  To: yahns-public

That object is not a Rack app, so lets avoid confusing
ourselves.
---
 lib/yahns/config.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/yahns/config.rb b/lib/yahns/config.rb
index 98fe170..e545d59 100644
--- a/lib/yahns/config.rb
+++ b/lib/yahns/config.rb
@@ -328,8 +328,8 @@ def app(type, *args, &block)
         "#{var}: #{file} did not register #{type} in #{self.class}::APP_CLASS"
 
     # apps may have multiple configurator contexts
-    app = @app_instances[klass.instance_key(*args)] = klass.new(*args)
-    ctx = app.config_context
+    app_cfg = @app_instances[klass.instance_key(*args)] = klass.new(*args)
+    ctx = app_cfg.config_context
     if block_given?
       @block = CfgBlock.new(:app, ctx)
       instance_eval(&block)
-- 
EW


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 19:56 [PATCH] config: more descriptive variable name Eric Wong

yahns Ruby server user/dev discussion

Archives are clonable:
	git clone --mirror https://yhbt.net/yahns-public
	git clone --mirror http://ou63pmih66umazou.onion/yahns-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.yahns

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox