Coder Social home page Coder Social logo

ri_for's People

Contributors

alexdantas avatar rdp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

andrew andydna

ri_for's Issues

bug

C:\dev\ruby\arguments\spec>spec arguments_spec.rb
.....[42, 51] in ./arguments_spec.rb
42 it "should allow for class arguments" do
43 Klass.send( :named_arguments_for, :defaults_with_class)
44 @instance.defaults_with_class(1, 3).should == 3
45 @instance.defaults_with_class(:a => 3).should == 3
46 require '_dbg'
=> 47 @instance.defaults_with_class().should == 4
48 end
49
50 it "should allow overriding with nil" do
51 Klass.send( :named_arguments_for, :two )
arguments_spec.rb:47
@instance.defaults_with_class().should == 4
(rdb:1) require 'desc_method'
./../lib/arguments.rb:10: warning: already initialized constant VERSION
true
(rdb:1) @instance.desc_method :defaults_with_class
sig: #<Method: Klass#defaults_with_class> arity: -1
searching ri for Klass#defaults_with_class...
Nothing known about Klass
(end ri)
nil

bug

irb(main):006:0> FFI::Library.desc_method :attach_function
NameError: undefined method attach_function' for classModule'
from C:/installs/ruby-1.9.1-p243-tweaked/lib/ruby/gems/1.9.1/gems/desc_method-0.1.8/lib/method_describer/method_desc.rb:168:in method' from C:/installs/ruby-1.9.1-p243-tweaked/lib/ruby/gems/1.9.1/gems/desc_method-0.1.8/lib/method_describer/method_desc.rb:168:indesc_method'
from (irb):6
from C:/installs/ruby-1.9.1-p243-tweaked/bin/irb.bat:20:in `

'

this is a bug

xsystem fails

from within extconf.rb
doesn't stop right

(rdb:1) desc_method :xsystem
sig: #      arity: 1
at C:/installs/ruby19_mingw/lib/ruby/1.9.1/mkmf.rb:292
def xsystem command
  varpat = /\$((\w+))|\${(\w+)}/
  if varpat =~ command
    vars = Hash.new {|h, k| h[k] = ''; ENV[k]}
    command = command.dup
    nil while command.gsub!(varpat) {vars[$1||$2]}
  end
  Logging::open do
    puts command.quote
    system(command)
  end
end

doesn't give params right

shouldn't params be at the end?

(rdb:1) Order.instance_method(:billing_address).desc

<UnboundMethod: Order#billing_address> arity: -1

could add more ancestors

even in non-verbose "uncommon" ancestors might work well.

non inherited class methods:

=> nil
irb(main):008:0> A.ancestors
=> [A, EventMachine, Object, RequireAll, Kernel]
-> EventMachine

wrong method?

should call ri for Regexp.new

irb(main):004:0> Regexp.ri_for :new
sig: Class#new arity -1
appears to be a c method
Searching ri for
sig: Class#new arity -1
...
-------------------------------------------------------------- Class#new
     class.new(args, ...)    =>  obj

     From gem ruby_core_ri-0.5.1
------------------------------------------------------------------------
     Calls +allocate+ to create a new object of _class_'s class, then
     invokes that object's +initialize+ method, passing it _args_. This
     is the method that ends up getting called whenever an object is
     constructed using .new.

(end ri)
=> "#"
irb(main):005:0> Regexp.ri_for :new

is this an issue?

(rdb:1) Order.desc_method :desc_method
ri for Object#desc_method
Nothing known about Object#desc_method

<UnboundMethod: Order(Object)#desc_method>

arity: -2
["#<UnboundMethod: Order(Object)#desc_method>", "arity: -2"]

no source?

poor verbiage thrown

good error, poor verbiage

irb(main):006:0> A.new.desc_method :go2
NameError: undefined method `go2' for class`A'
        from c:/ruby/lib/ruby/gems/1.8/gems/desc_method-0.1.0/lib/method_describer/method_desc.rb:144:in `method'
        from c:/ruby/lib/ruby/gems/1.8/gems/desc_method-0.1.0/lib/method_describer/method_desc.rb:144:in`desc_method'
        from (irb):6
        from ♥:0

fails with rails

> > Promotion.ri_for :create!
> > sig: Class#create! arity -1
> > appears to be a c method
> > Searching ri for
> > sig: Class#create! arity -1
> > ...
> > Nothing known about Class#create!
> > (end ri)
> > => "sig: Class#create! arity -1"
> > Promotion.ri_for :create
> > sig: ActiveRecord::Timestamp#create arity 0
> > appears to be a c method
> > Searching ri for
> > sig: ActiveRecord::Timestamp#create arity 0
> > ...
> > Nothing known about ActiveRecord
> > (end ri)
> > => "sig: ActiveRecord::Timestamp#create arity 0"
> > ActiveRecord::Base.ri_for :create!
> > sig: Class#create! arity -1
> > appears to be a c method
> > Searching ri for
> > sig: Class#create! arity -1
> > ...
> > Nothing known about Class#create!
> > (end ri)
> > => "sig: Class#create! arity -1"

doesn't work with modules

irb(main):005:0> EM.desc_class
NoMethodError: undefined method `desc_class' for EventMachine:Module
from (irb):5
from ♥:0

don't monkey patch methods

people might use that.
instead add methods_delin

also make sure it works...quite well, and pass out multiple arrays, possibly arrays of hashes?

wants arity at the end

sig: #<Method: Process.wait> arity: -1
appears to be a c method
searching ri for Process.wait...
Updating ri class cache with 0 classes...
Nothing known about Process
(end ri)
=> "#<Method: Process.wait>"

bug?

(rdb:1) Order.desc_method :observers=
ri for Class#observers=
Nothing known about Class#observers=
(end ri)

<Method: Class#observers=> arity: -1

nil

bug

> > File.desc_method :sanitize
> > sig: #      arity: 1
> > searching ri for File.sanitize...
> > Nothing known about File.sanitize
> > (end ri)
> > Errno::ENOENT: No such file or directory - c
> >         from c:/ruby18/lib/ruby/gems/1.8/gems/desc_method-0.1.5/lib/method_describer/method_desc.rb:103:in `readlines'
> >         from c:/ruby18/lib/ruby/gems/1.8/gems/desc_method-0.1.5/lib/method_describer/method_desc.rb:103:in`__original_desc'
> >         from c:/ruby18/lib/ruby/gems/1.8/gems/rdp-arguments-0.6.1/lib/arguments/class.rb:62:in `desc'
> >         from c:/ruby18/lib/ruby/gems/1.8/gems/desc_method-0.1.5/lib/method_describer/method_desc.rb:157:in`desc_method'
> >         from (irb):4
> >         from c:/ruby18/lib/ruby/1.8/fileutils.rb:1577
> > exit

al

#new should be #initialize

yup

(rdb:1) require 'desc_method'
true
(rdb:1) Zlib::GzipReader.desc_method :new

<Method: Class#new> arity: -1

searching ri for Class#new...
Nothing known about Class#new

parses parameters wrong in 1.8

yup it appears to indeed

(end ri)
def update_all(updates, conditions = nil, options = { })
sql = "UPDATE #{quoted_table_name} SET #{sanitize_sql_for_assignment(updates)} "
scope = scope(:find)
add_conditions!(sql, conditions, scope)
add_order!(sql, options[:order], nil)
add_limit!(sql, options, nil)
connection.update(sql, "#{name} Update")
end
Parameters: update_all()
"Parameters: update_all()"
(rdb:1)

should say what type of method it is

(rdb:1) Tempfile.desc_method :open

<UnboundMethod: Tempfile#open> arity: 0

should say "are you an instance method or a class method?" I suppose...

grabs wrong signature

irb(main):003:0> File.ri_for :write
sig: IO#write arity 1
appears to be a c method
Searching ri for
sig: IO#write arity 1

yep that's the wrong one...

poor params in 1.9

C:\dev\ruby\scene-skipper>ruby go.rb
 at go.rb:2
sig: A#go arity 0
    def go
       33
    end
Original code signature: def go
# parameters signature: go( [] )

still fails to parse shtuff

(end ri)
fail to parse tree: ActionController::Assertions::SelectorAssertions You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.last c:/ruby18/lib/ruby/gems/1.8/gems/ruby2ruby-1.1.9/lib/ruby2ruby.rb:192:in process_block_pass'c:/ruby18/lib/ruby/gems/1.8/gems/sexp_processor-3.0.2/lib/sexp_processor.rb:212:insend'c:/ruby18/lib/ruby/gems/1.8/gems/sexp_processor-3.0.2/lib/sexp_processor.rb:212:in process'c:/ruby18/lib/ruby/gems/1.8/gems/sexp_processor-3.0.2/lib/sexp_processor.rb:264:inerror_handler'c:/ruby18/lib/ruby/gems/1.8/gems/sexp_processor-3.0.2/lib/sexp_processor.rb:211:in process'c:/ruby18/lib/ruby/gems/1.8/gems/ParseTree-3.0.4/lib/unified_ruby.rb:9:inprocess'c:/ruby18/lib/ruby/gems/1.8/gems/ruby2ruby-1.1.9/lib/ruby2ruby.rb:46:in process'c:/ruby18/lib/ruby/gems/1.8/gems/ruby2ruby-1.1.9/lib/ruby2ruby.rb:95:inprocess_arglist'c:/ruby18/lib/ruby/gems/1.8/gems/sexp_processor-3.0.2/lib/sexp_processor.rb:212:in send'c:/ruby18/lib/ruby/gems/1.8/gems/sexp_processor-3.0.2/lib/sexp_processor.rb:212:inprocess'c:/ruby18/lib/ruby/g

doesn't output code for this one

Order.instance_method(:billing_address).desc
ri for Order#billing_address
Nothing known about Order

<UnboundMethod: Order#billing_address>

arity: -1
=> nil

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.