diff options
author | Eric Wong <e@80x24.org> | 2017-02-21 21:25:25 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-02-21 21:27:27 +0000 |
commit | 2c6aa5878d052abb77c6d119e1c2e2110118a244 (patch) | |
tree | 5492a4b2a207ca6858390212cddbf332b3c129dc | |
parent | c4b58719e8aa7f2b4979d139ca166a8c6a11eb7e (diff) | |
download | unicorn-2c6aa5878d052abb77c6d119e1c2e2110118a244.tar.gz |
We'll be moving to direct ivar access to reduce the API (and method entry) overhead of internal unicorn classes. This means some tests like this one will reach deeper into internals. This will be necessary for the upcoming changes to add new configuration options to unicorn.
-rwxr-xr-x | t/t0012-reload-empty-config.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t0012-reload-empty-config.sh b/t/t0012-reload-empty-config.sh index 81e1fb3..47d18ce 100755 --- a/t/t0012-reload-empty-config.sh +++ b/t/t0012-reload-empty-config.sh @@ -18,7 +18,8 @@ after_fork { |s,w| } next if key =~ %r{\Astd(?:err|out)_path\z} key = key.to_sym def_value = defaults[key] - srv_value = srv.__send__(key) + srv_value = srv.respond_to?(key) ? srv.__send__(key) + : srv.instance_variable_get("@#{key}") fp << "#{key}|#{srv_value}|#{def_value}\\n" end } |