From 6a32aee20d8cb7299db8473d786d68d70aa5478e Mon Sep 17 00:00:00 2001 From: Darrick Wiebe Date: Mon, 22 Aug 2011 15:52:03 -0400 Subject: [PATCH] Fixes #195. #correct_arg_arity for JRUBY was broken. --- lib/pry/command_set.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/pry/command_set.rb b/lib/pry/command_set.rb index ded5dba1..074b7b25 100644 --- a/lib/pry/command_set.rb +++ b/lib/pry/command_set.rb @@ -24,9 +24,10 @@ class Pry case arity <=> 0 when -1 args - when 1, 0 - # Keep 1.8 happy - args.values_at 0..(arity - 1) + when 0 + [] + when 1 + args[0, arity] end end end