[MacRuby] #1363: macirb "framework 'AppKit' results in segfault
MacRuby
ruby-noreply at macosforge.org
Tue Jul 19 13:08:28 PDT 2011
#1363: macirb "framework 'AppKit' results in segfault
---------------------------------+------------------------------------------
Reporter: will@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
---------------------------------+------------------------------------------
Comment(by will@…):
irbrc was it. I renamed it, and the segfualt went away.
I should have been clued into that, since for macirb I had to wrap my
requires the LoadError rescue
I haven't tracked down which of these things cause that to happen, but
here is what I have.
{{{
#!/usr/bin/ruby
begin
require 'irb/completion'
require 'irb/ext/save-history'
require 'rubygems'
require 'interactive_editor'
rescue LoadError
end
IRB.conf[:SAVE_HISTORY] = 1000
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history"
IRB.conf[:PROMPT_MODE] = :SIMPLE
IRB.conf[:AUTO_INDENT] = true
class Object
# list methods which aren't in superclass
def local_methods(obj = self)
(obj.methods - obj.class.superclass.instance_methods).sort
end
# print documentation
#
# ri 'Array#pop'
# Array.ri
# Array.ri :pop
# arr.ri :pop
def ri(method = nil)
unless method && method =~ /^[A-Z]/ # if class isn't specified
klass = self.kind_of?(Class) ? name : self.class.name
method = [klass, method].compact.join('#')
end
puts `ri '#{method}'`
end
end
def copy(str)
IO.popen('pbcopy', 'w') { |f| f << str.to_s }
end
def paste
`pbpaste`
end
load File.dirname(__FILE__) + '/.railsrc' if $0 == 'irb' &&
ENV['RAILS_ENV']
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/1363#comment:3>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list