summaryrefslogtreecommitdiff
path: root/benchmark/pm_array.yml
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/pm_array.yml')
-rw-r--r--benchmark/pm_array.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/benchmark/pm_array.yml b/benchmark/pm_array.yml
new file mode 100644
index 0000000000..babb65a289
--- /dev/null
+++ b/benchmark/pm_array.yml
@@ -0,0 +1,19 @@
+prelude: |
+ def call(*val)
+ case val
+ in [String => body]
+ [200, {}, [body]]
+ in [Integer => status]
+ [status, {}, [""]]
+ in [Integer, String] => response
+ [response[0], {}, [response[1]]]
+ in [Integer, Hash, String] => response
+ [response[0], response[1], [response[2]]]
+ end
+ end
+
+benchmark:
+ first_match: call("ok")
+ second_match: call(401)
+ third_match: call(200, "ok")
+ fourth_match: call(201, {}, "created")
d4-4d8f-98ff-823fe69b080e 2009-02-03* test/etc/test_etc.rb(test_getpwnam, test_getgrgid, test_getgrnam):mame support an envirionment that has duplicative entries. a patch from Tomoyuki Chikanaga <chikanag at nippon-control-system.co.jp> in [ruby-dev:37882]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2008-09-03* test/etc/test_etc.rb (test_getpwuid, test_getgrgid): usemame Process.euid and egid instead of Etc.getlogin to identify current user which may be different from a login one (e.g., su command). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2008-09-03* test/etc/test_etc.rb: check only typical use ofmame setpwent/getpwent/endpwent and setgrent/getgrent/endgrent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2008-07-29* test/etc/test_etc.rb (test_passwd): age field may be string undermame some environments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2008-07-29* test/etc/test_etc.rb (test_getpwuid): fix for users whose uid isnaruse shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2008-06-18* test/etc/test_etc.rb: avoid infinite loop. [ruby-dev:35158]mame git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2008-06-04avoid infinite loop on FreeBSD 6.3.akr git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e 2008-06-03* test/etc/test_etc.rb: new tests for etc.mame git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e