rogerdpack-arguments 0.4.7.6 → 0.4.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,8 +51,10 @@ module NamedArgs
51
51
  alias #{ meth } __new_#{ meth }
52
52
  RUBY_EVAL
53
53
 
54
+ puts "wrapping #{ meth } with this code #{new_code}" if $VERBOSE
55
+
54
56
  begin
55
- klass.module_eval new_code, __FILE__, line_loc + 1
57
+ klass.module_eval new_code, __FILE__ + '.approximately', line_loc + 1
56
58
  rescue SyntaxError => e
57
59
  puts "warning--unable to wrap method #{ meth } -- possibly a syntax exception or it's not all on one line in 1.9 -- #{new_code}"
58
60
  throw e
data/lib/arguments/vm.rb CHANGED
@@ -5,6 +5,7 @@ module Arguments
5
5
  return [] unless source and line
6
6
  str = IO.readlines(source)[ line - 1 ]
7
7
  return [] if str.match(/\*\w+/)
8
+ throw 'poor comma' + str if str =~ /,\W*&/
8
9
  str.match(/def\s*\w+\s*\(?\s*([^)\n]*)/)[1] #This could look better
9
10
  .scan(/(\w+)(?:\s*=\s*([^,]+))|(\w+)/).map{ |e| e.compact }
10
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rogerdpack-arguments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7.6
4
+ version: 0.4.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Macario Ortega