code stringlengths 1 1.73M | language stringclasses 1
value |
|---|---|
# We represent the various high-level code constructs that appear
# in Ruby programs: classes, modules, methods, and so on.
require 'rdoc/tokenstream'
module RDoc
# We contain the common stuff for contexts (which are containers)
# and other elements (methods, attributes and so on)
#
class CodeObject
at... | Ruby |
module DOT
# these glogal vars are used to make nice graph source
$tab = ' '
$tab2 = $tab * 2
# if we don't like 4 spaces, we can change it any time
def change_tab( t )
$tab = t
$tab2 = t * 2
end
# options for node declaration
NODE_OPTS = [
'bgcolor',
... | Ruby |
# A TokenStream is a list of tokens, gathered during the parse
# of some entity (say a method). Entities populate these streams
# by being registered with the lexer. Any class can collect tokens
# by including TokenStream. From the outside, you use such an object
# by calling the start_collecting_tokens method, followe... | Ruby |
module RI
# Encapsulate all the strangeness to do with finding out
# where to find RDoc files
#
# We basically deal with three directories:
#
# 1. The 'system' documentation directory, which holds
# the documentation distributed with Ruby, and which
# is managed by the Ruby install process
# 2.... | Ruby |
require 'yaml'
require 'rdoc/markup/simple_markup/fragments'
# Descriptions are created by RDoc (in ri_generator) and
# written out in serialized form into the documentation
# tree. ri then reads these to generate the documentation
module RI
class NamedThing
attr_reader :name
def initialize(name)
@nam... | Ruby |
# We handle the parsing of options, and subsequently as a singleton
# object to be queried for option values
module RI
require 'rdoc/ri/ri_paths'
require 'rdoc/ri/ri_display'
VERSION_STRING = "ri v1.0.1 - 20041108"
class Options
require 'singleton'
require 'getoptlong'
include Singleto... | Ruby |
require 'rdoc/ri/ri_util'
require 'rdoc/ri/ri_formatter'
require 'rdoc/ri/ri_options'
# This is a kind of 'flag' module. If you want to write your
# own 'ri' display module (perhaps because you'r writing
# an IDE or somesuch beast), you simply write a class
# which implements the various 'display' methods in 'Default... | Ruby |
module RI
class ClassEntry
attr_reader :name
attr_reader :path_names
def initialize(path_name, name, in_class)
@path_names = [ path_name ]
@name = name
@in_class = in_class
@class_methods = []
@instance_methods = []
@inferior_classes = []
end
# We fou... | Ruby |
module RI
class TextFormatter
attr_reader :indent
def initialize(options, indent)
@options = options
@width = options.width
@indent = indent
end
######################################################################
def draw_line(label=nil)
len = @wi... | Ruby |
require 'fileutils'
module RI
class RiWriter
def RiWriter.class_desc_path(dir, class_desc)
File.join(dir, "cdesc-" + class_desc.name + ".yaml")
end
# Convert a name from internal form (containing punctuation)
# to an external form (where punctuation is replaced
# by %xx)
def RiW... | Ruby |
require 'rdoc/ri/ri_descriptions'
require 'rdoc/ri/ri_writer'
require 'rdoc/markup/simple_markup/to_flow'
module RI
class RiReader
def initialize(ri_cache)
@cache = ri_cache
end
def top_level_namespace
[ @cache.toplevel ]
end
def lookup_namespace_in(target, namespaces)
result... | Ruby |
require 'rdoc/ri/ri_paths'
require 'rdoc/usage'
require 'rdoc/ri/ri_cache'
require 'rdoc/ri/ri_util'
require 'rdoc/ri/ri_reader'
require 'rdoc/ri/ri_formatter'
require 'rdoc/ri/ri_options'
######################################################################
class RiDriver
def initialize
@options = RI::Opti... | Ruby |
######################################################################
class RiError < Exception; end
#
# Break argument into its constituent class or module names, an
# optional method type, and a method name
class NameDescriptor
attr_reader :class_names
attr_reader :method_name
# true and false have the obv... | Ruby |
# = Synopsis
#
# This library allows command-line tools to encapsulate their usage
# as a comment at the top of the main file. Calling <tt>RDoc::usage</tt>
# then displays some or all of that comment, and optionally exits
# the program with an exit status. We always look for the comment
# in the main program file, so i... | Ruby |
# = Introduction
#
# SimpleMarkup parses plain text documents and attempts to decompose
# them into their constituent parts. Some of these parts are high-level:
# paragraphs, chunks of verbatim text, list entries and the like. Other
# parts happen at the character level: a piece of bold text, a word in
# code font. Thi... | Ruby |
# This program illustrates the basic use of the SimpleMarkup
# class. It extracts the first comment block from the
# simple_markup.rb file and converts it into HTML on
# standard output. Run it using
#
# % ruby sample.rb
#
# You should be in the sample/ directory when you do this,
# as it hardwires the path to the fi... | Ruby |
#!/usr/local/bin/ruby
# Illustration of a script to convert an RDoc-style file to a LaTeX
# document
require 'rdoc/markup/simple_markup'
require 'rdoc/markup/simple_markup/to_latex'
p = SM::SimpleMarkup.new
h = SM::ToLaTeX.new
#puts "\\documentclass{report}"
#puts "\\usepackage{tabularx}"
#puts "\\usepackage{parskip... | Ruby |
module SM
##
# Handle common directives that can occur in a block of text:
#
# : include : filename
#
class PreProcess
def initialize(input_file_name, include_path)
@input_file_name = input_file_name
@include_path = include_path
end
# Look for common options in a chunk of text. ... | Ruby |
module SM
# We manage a set of attributes. Each attribute has a symbol name
# and a bit value
class Attribute
SPECIAL = 1
@@name_to_bitmap = { :_SPECIAL_ => SPECIAL }
@@next_bitmap = 2
def Attribute.bitmap_for(name)
bitmap = @@name_to_bitmap[name]
if !bitmap
bitmap = @@next... | Ruby |
require 'rdoc/markup/simple_markup/lines.rb'
#require 'rdoc/markup/simple_markup/to_flow.rb'
module SM
##
# A Fragment is a chunk of text, subclassed as a paragraph, a list
# entry, or verbatim text
class Fragment
attr_reader :level, :param, :txt
attr_accessor :type
def initialize(level, param... | Ruby |
##########################################################################
#
# We store the lines we're working on as objects of class Line.
# These contain the text of the line, along with a flag indicating the
# line type, and an indentation level
module SM
class Line
INFINITY = 9999
BLANK = :BLANK
... | Ruby |
require 'rdoc/markup/simple_markup/fragments'
require 'rdoc/markup/simple_markup/inline'
require 'cgi'
module SM
module Flow
P = Struct.new(:body)
VERB = Struct.new(:body)
RULE = Struct.new(:width)
class LIST
attr_reader :type, :contents
def initialize(type)
@type = type
... | Ruby |
require 'rdoc/markup/simple_markup/fragments'
require 'rdoc/markup/simple_markup/inline'
require 'cgi'
module SM
# Convert SimpleMarkup to basic LaTeX report format
class ToLaTeX
BS = "\020" # \
OB = "\021" # {
CB = "\022" # }
DL = "\023" # Dollar
BACKSLASH = "#{BS}symbol#{OB}92#... | Ruby |
require 'rdoc/markup/simple_markup/fragments'
require 'rdoc/markup/simple_markup/inline'
require 'cgi'
module SM
class ToHtml
LIST_TYPE_TO_HTML = {
ListBase::BULLET => [ "<ul>", "</ul>" ],
ListBase::NUMBER => [ "<ol>", "</ol>" ],
ListBase::UPPERALPHA => [ "<ol>", "</ol>" ],
ListBase... | Ruby |
require 'test/unit'
$:.unshift "../../.."
require 'rdoc/markup/simple_markup'
include SM
class TestParse < Test::Unit::TestCase
class MockOutput
def start_accepting
@res = []
end
def end_accepting
@res
end
def accept_paragraph(am, fragment)
@res << fragment.to_s
... | Ruby |
require 'TestParse.rb'
require 'TestInline.rb'
| Ruby |
require "test/unit"
$:.unshift "../../.."
require "rdoc/markup/simple_markup/inline"
class TestInline < Test::Unit::TestCase
def setup
@am = SM::AttributeManager.new
@bold_on = @am.changed_attribute_by_name([], [:BOLD])
@bold_off = @am.changed_attribute_by_name([:BOLD], [])
@tt_on = @am... | Ruby |
#!/usr/local/bin/ruby
# Parse a Ruby source file, building a set of objects
# representing the modules, classes, methods,
# requires, and includes we find (these classes
# are defined in code_objects.rb).
# This file contains stuff stolen outright from:
#
# rtags.rb -
# ruby-lex.rb - ruby lexcal analizer
# rub... | Ruby |
require "rdoc/parsers/parse_simple"
module RDoc
# A parser is simple a class that implements
#
# #initialize(file_name, body, options)
#
# and
#
# #scan
#
# The initialize method takes a file name to be used, the body of the
# file, and an RDoc::Options object. The scan method is then called
... | Ruby |
# Parse a non-source file. We basically take the whole thing
# as one big comment. If the first character in the file
# is '#', we strip leading pound signs.
require "rdoc/code_objects"
require "rdoc/markup/simple_markup/preprocess"
module RDoc
# See rdoc/parsers/parse_c.rb
class SimpleParser
# prepar... | Ruby |
#= parse_f95.rb - Fortran95 Parser
#
#== Overview
#
#"parse_f95.rb" parses Fortran95 files with suffixes "f90", "F90", "f95"
#and "F95". Fortran95 files are expected to be conformed to Fortran95
#standards.
#
#== Rules
#
#Fundamental rules are same as that of the Ruby parser.
#But comment markers are '!' not '#'.
#
#==... | Ruby |
# Classes and modules built in to the interpreter. We need
# these to define superclasses of user objects
require "rdoc/code_objects"
require "rdoc/parsers/parserfactory"
require "rdoc/options"
require "rdoc/rdoc"
module RDoc
##
# Ruby's built-in classes.
KNOWN_CLASSES = {
"rb_cObject" => "Objec... | Ruby |
#
# irb.rb - irb main module
# $Release Version: 0.9.5 $
# $Revision: 24483 $
# $Date: 2009-08-09 17:44:15 +0900 (Sun, 09 Aug 2009) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "e2mmap"
require "irb/init"
require "irb/context"
require "irb/extend-command"
#require "irb/workspace"
req... | Ruby |
# The Singleton module implements the Singleton pattern.
#
# Usage:
# class Klass
# include Singleton
# # ...
# end
#
# * this ensures that only one instance of Klass lets call it
# ``the instance'' can be created.
#
# a,b = Klass.instance, Klass.instance
# a == b # => true
# a.new ... | Ruby |
# logger.rb - simple logging utility
# Copyright (C) 2000-2003, 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>.
require 'monitor'
# Simple logging utility.
#
# Author:: NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
# Documentation:: NAKAMURA, Hiroshi and Gavin Sinclair
# License::
# You can redistribute it and/or mod... | Ruby |
# Env.rb -- imports environment variables as global variables, Perlish ;(
# Usage:
#
# require 'Env'
# p $USER
# $USER = "matz"
# p ENV["USER"]
require 'importenv'
if __FILE__ == $0
p $TERM
$TERM = nil
p $TERM
p ENV["TERM"]
$TERM = "foo"
p ENV["TERM"]
end
| Ruby |
#
# parsearg.rb - parse arguments
# $Release Version: $
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Yasuo OHBA(SHL Japan Inc. Technology Dept.)
#
# --
#
#
#
warn "Warning:#{caller[0].sub(/:in `.*'\z/, '')}: parsearg is deprecated after Ruby 1.8.1; use optparse instead"
... | Ruby |
# -*- mode: ruby; ruby-indent-level: 4; tab-width: 4 -*- vim: sw=4 ts=4
# $Id: yaml.rb 16084 2008-04-19 11:45:39Z knu $
#
# = yaml.rb: top-level module with methods for loading and parsing YAML documents
#
# Author:: why the lucky stiff
#
require 'stringio'
require 'yaml/error'
require 'yaml/syck'
require 'yaml/tag'
... | Ruby |
#
# mathn.rb -
# $Release Version: 0.5 $
# $Revision: 1.1.1.1.4.1 $
# $Date: 1998/01/16 12:36:05 $
# by Keiju ISHITSUKA(SHL Japan Inc.)
#
# --
#
#
#
require "complex.rb"
require "rational.rb"
require "matrix.rb"
class Integer
def gcd2(int)
a = self.abs
b = int.abs
a, b = b, a if a < b... | Ruby |
# XSD4R - Code generation support
# Copyright (C) 2004, 2005 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version.
... | Ruby |
# XSD4R - Generating comment definition code
# Copyright (C) 2004 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later versio... | Ruby |
# XSD4R - Generating method definition code
# Copyright (C) 2004 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version... | Ruby |
# XSD4R - Generating module definition code
# Copyright (C) 2004 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version... | Ruby |
# XSD4R - Generating class definition code
# Copyright (C) 2004 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version.... | Ruby |
# XSD4R - XML Mapping for Ruby
# Copyright (C) 2005 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version.
require "... | Ruby |
# XSD4R - XML Instance parser library.
# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later versio... | Ruby |
# XSD4R - XML Schema Datatype 1999 support
# Copyright (C) 2001, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later ve... | Ruby |
# XSD4R - XML Schema Datatype implementation.
# Copyright (C) 2000, 2001, 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, ... | Ruby |
# XSD4R - WSDL named element collection.
# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any late... | Ruby |
# XSD4R - Generating code library
# Copyright (C) 2004 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version.
requir... | Ruby |
# XSD4R - XMLParser XML parser library.
# Copyright (C) 2001, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later versi... | Ruby |
# XSD4R - XMLScan XML parser library.
# Copyright (C) 2002, 2003, 2005 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later v... | Ruby |
# XSD4R - REXMLParser XML parser library.
# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later ver... | Ruby |
# XSD4R - XML Instance parser library.
# Copyright (C) 2002, 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later versio... | Ruby |
# XSD4R - XML Schema Namespace library
# Copyright (C) 2000-2003, 2005 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later v... | Ruby |
# XSD4R - XML QName definition.
# Copyright (C) 2002, 2003, 2004 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version... | Ruby |
# XSD4R - Charset handling library.
# Copyright (C) 2001, 2003, 2005 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later ver... | Ruby |
# XSD4R - Charset handling with iconv.
# Copyright (C) 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>.
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's license;
# either the dual license version in 2003, or any later version.
r... | Ruby |
# = ERB -- Ruby Templating
#
# Author:: Masatoshi SEKI
# Documentation:: James Edward Gray II and Gavin Sinclair
#
# See ERB for primary documentation and ERB::Util for a couple of utility
# routines.
#
# Copyright (c) 1999-2000,2002,2003 Masatoshi SEKI
#
# You can redistribute it and/or modify it under the same terms ... | Ruby |
#
# complex.rb -
# $Release Version: 0.5 $
# $Revision: 1.3 $
# $Date: 1998/07/08 10:05:28 $
# by Keiju ISHITSUKA(SHL Japan Inc.)
#
# ----
#
# complex.rb implements the Complex class for complex numbers. Additionally,
# some methods in other Numeric classes are redefined or added to allow greater
# inte... | Ruby |
# = forwardable - Support for the Delegation Pattern
#
# $Release Version: 1.1$
# $Revision: 16857 $
# $Date: 2008-06-06 17:05:24 +0900 (Fri, 06 Jun 2008) $
# by Keiju ISHITSUKA(keiju@ishitsuka.com)
#
# Documentation by James Edward Gray II and Gavin Sinclair
#
# == Introduction
#
# This library allows y... | Ruby |
# = PStore -- Transactional File Storage for Ruby Objects
#
# pstore.rb -
# originally by matz
# documentation by Kev Jackson and James Edward Gray II
#
# See PStore for documentation.
require "fileutils"
require "digest/md5"
#
# PStore implements a file based persistence mechanism based on a Hash. User
# code ... | Ruby |
#
# = ping.rb: Check a host for upness
#
# Author:: Yukihiro Matsumoto
# Documentation:: Konrad Meyer
#
# Performs the function of the basic network testing tool, ping.
# See: Ping.
#
require 'timeout'
require "socket"
#
# Ping contains routines to test for the reachability of remote hosts.
# Currently the only rou... | Ruby |
#
# irb/init.rb - irb initialize module
# $Release Version: 0.9.5$
# $Revision: 24483 $
# $Date: 2009-08-09 17:44:15 +0900 (Sun, 09 Aug 2009) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
module IRB
# initialize config
def IRB.setup(ap_path)
IRB.init_config(ap_path)
IRB.init_er... | Ruby |
#
# xmp.rb - irb version of gotoken xmp
# $Release Version: 0.9$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(Nippon Rational Inc.)
#
# --
#
#
#
require "irb"
require "irb/frame"
class XMP
@RCS_ID='-$Id: xmp.rb 11708 2007-02-12 23:01:19Z shyouhei... | Ruby |
#
# irb/ruby-token.rb - ruby tokens
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
module RubyToken
EXPR_BEG = :EXPR_BEG
EXPR_MID = :EXPR_MID
EXPR_END = :EXPR_END
EXPR_ARG = :EXPR_AR... | Ruby |
#
# frame.rb -
# $Release Version: 0.9$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd)
#
# --
#
#
#
require "e2mmap"
module IRB
class Frame
extend Exception2MessageMapper
def_exception :FrameOverflow, "fram... | Ruby |
#
# irb/version.rb - irb version definition file
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ishitsuka.com)
#
# --
#
#
#
module IRB
@RELEASE_VERSION = "0.9.5"
@LAST_UPDATE_DATE = "05/04/13"
end
| Ruby |
#
# irb/workspace-binding.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
module IRB
class WorkSpace
# create new workspace. set self to main if specified, otherwise
# inherit ... | Ruby |
#
# irb/context.rb - irb context
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "irb/workspace"
module IRB
class Context
#
# Arguments:
# input_method: nil -- stdin o... | Ruby |
#
# irb/help.rb - print usage module
# $Release Version: 0.9.5$
# $Revision: 16857 $
# $Date: 2008-06-06 17:05:24 +0900 (Fri, 06 Jun 2008) $
# by Keiju ISHITSUKA(keiju@ishitsuka.com)
#
# --
#
#
#
module IRB
def IRB.print_usage
lc = IRB.conf[:LC_MESSAGES]
path = lc.find("irb/help-message")
... | Ruby |
#
# irb/completor.rb -
# $Release Version: 0.9$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ishitsuka.com)
# From Original Idea of shugo@ruby-lang.org
#
require "readline"
module IRB
module InputCompletor
@RCS_ID='-$Id: completion... | Ruby |
#
# irb/extend-command.rb - irb extend command
# $Release Version: 0.9.5$
# $Revision: 25814 $
# $Date: 2009-11-17 15:51:29 +0900 (Tue, 17 Nov 2009) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
module IRB
#
# IRB extended command
#
module ExtendCommandBundle
EXCB = ExtendComman... | Ruby |
#
# notifier.rb - output methods used by irb
# $Release Version: 0.9.5$
# $Revision: 16857 $
# $Date: 2008-06-06 17:05:24 +0900 (Fri, 06 Jun 2008) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "e2mmap"
require "irb/output-method"
module IRB
module Notifier
extend Exception2M... | Ruby |
#
# push-ws.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
module IRB
class Context
def irb_level
workspace_stack.size
end
def workspaces
if defined? @works... | Ruby |
#
# irb/ext/cb.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
module IRB
class Context
def home_workspace
if defined? @home_workspace
@home_workspace
else
@home_wo... | Ruby |
#
# history.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
module IRB
class Context
NOPRINTING_IVARS.push "@eval_history_values"
alias _set_last_value set_last_value
... | Ruby |
#
# loader.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
module IRB
class LoadAbort < Exception;end
module IrbLoader
@RCS_ID='-$Id: loader.rb 11708 2007-02-12 23:01:19Z shyo... | Ruby |
#
# use-loader.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "irb/cmd/load"
require "irb/ext/loader"
class Object
alias __original__load__IRB_use_loader__ load
alias __or... | Ruby |
#
# math-mode.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "mathn"
module IRB
class Context
attr_reader :math_mode
alias math? math_mode
def math_mode=(opt)
... | Ruby |
#
# irb/lib/tracer.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "tracer"
module IRB
# initialize tracing function
def IRB.initialize_tracer
Tracer.verbose = false
... | Ruby |
#
# irb/multi-irb.rb - multiple irb module
# $Release Version: 0.9.5$
# $Revision: 25814 $
# $Date: 2009-11-17 15:51:29 +0900 (Tue, 17 Nov 2009) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
IRB.fail CantShiftToMultiIrbMode unless defined?(Thread)
require "thread"
module IRB
# job managem... | Ruby |
#!/usr/local/bin/ruby
#
# save-history.rb -
# $Release Version: 0.9.5$
# $Revision: 24483 $
# $Date: 2009-08-09 17:44:15 +0900 (Sun, 09 Aug 2009) $
# by Keiju ISHITSUKAkeiju@ruby-lang.org)
#
# --
#
#
#
require "readline"
module IRB
module HistorySavingAbility
@RCS_ID='-$Id: save-history.rb 244... | Ruby |
#
# change-ws.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "irb/cmd/nop.rb"
require "irb/ext/workspaces.rb"
module IRB
module ExtendCommand
class Workspaces<Nop
... | Ruby |
#
# change-ws.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "irb/cmd/nop.rb"
require "irb/ext/change-ws.rb"
module IRB
module ExtendCommand
class CurrentWorkingWorkspa... | Ruby |
#
# fork.rb -
# $Release Version: 0.9.5 $
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
@RCS_ID='-$Id: fork.rb 11708 2007-02-12 23:01:19Z shyouhei $-'
module IRB
module ExtendCommand
class Fork<Nop
def... | Ruby |
#
# help.rb - helper using ri
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
#
# --
#
#
#
require 'rdoc/ri/ri_driver'
module IRB
module ExtendCommand
module Help
begin
@ri = RiDriver.new
rescue SystemExit
else
... | Ruby |
#
# nop.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
module IRB
module ExtendCommand
class Nop
@RCS_ID='-$Id: nop.rb 11708 2007-02-12 23:01:19Z shyouhei $-'
... | Ruby |
#
# load.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "irb/cmd/nop.rb"
require "irb/ext/loader"
module IRB
module ExtendCommand
class Load<Nop
include IrbLoader
... | Ruby |
#!/usr/local/bin/ruby
#
# multi.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "irb/cmd/nop.rb"
require "irb/ext/multi-irb"
module IRB
module ExtendCommand
class IrbComm... | Ruby |
#
# irb/input-method.rb - input methods used irb
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
module IRB
#
# InputMethod
# StdioInputMethod
# FileInputMethod
# (ReadlineInputMeth... | Ruby |
#
# irb/ws-for-case-2.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
while true
IRB::BINDING_QUEUE.push b = binding
end
| Ruby |
#
# irb/ruby-lex.rb - ruby lexcal analyzer
# $Release Version: 0.9.5$
# $Revision: 16857 $
# $Date: 2008-06-06 17:05:24 +0900 (Fri, 06 Jun 2008) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "e2mmap"
require "irb/slex"
require "irb/ruby-token"
class RubyLex
@RCS_ID='-$Id: ruby-le... | Ruby |
#
# irb/slex.rb - simple lex analyzer
# $Release Version: 0.9.5$
# $Revision: 16857 $
# $Date: 2008-06-06 17:05:24 +0900 (Fri, 06 Jun 2008) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "e2mmap"
require "irb/notifier"
module IRB
class SLex
@RCS_ID='-$Id: slex.rb 16857 2008-06... | Ruby |
#
# irb/locale.rb - internationalization module
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
autoload :Kconv, "kconv"
module IRB
class Locale
@RCS_ID='-$Id: locale.rb 11708 2007-02-... | Ruby |
#
# irb/lc/error.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "e2mmap"
module IRB
# exceptions
extend Exception2MessageMapper
def_exception :UnrecognizedSwitch, "Unrec... | Ruby |
#
# irb/lc/ja/error.rb -
# $Release Version: 0.9.5$
# $Revision: 11708 $
# $Date: 2007-02-13 08:01:19 +0900 (Tue, 13 Feb 2007) $
# by Keiju ISHITSUKA(keiju@ruby-lang.org)
#
# --
#
#
#
require "e2mmap"
module IRB
# exceptions
extend Exception2MessageMapper
def_exception :UnrecognizedSwitch, '$B... | Ruby |
# CSV -- module for generating/parsing CSV data.
# Copyright (C) 2000-2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>.
# $Id: csv.rb 11708 2007-02-12 23:01:19Z shyouhei $
# This program is copyrighted free software by NAKAMURA, Hiroshi. You can
# redistribute it and/or modify it under the same terms of Ruby's li... | Ruby |
#
# tmpdir - retrieve temporary directory path
#
# $Id: tmpdir.rb 21776 2009-01-26 02:12:10Z shyouhei $
#
require 'fileutils'
class Dir
@@systmpdir = '/tmp'
begin
require 'Win32API'
CSIDL_LOCAL_APPDATA = 0x001c
max_pathlen = 260
windir = "\0"*(max_pathlen+1)
begin
getdir = Win32API.new... | Ruby |
#
# URI support for Ruby
#
# Author:: Akira Yamada <akira@ruby-lang.org>
# Documentation:: Akira Yamada <akira@ruby-lang.org>, Dmitry V. Sabanin <sdmitry@lrn.ru>
# License::
# Copyright (c) 2001 akira yamada <akira@ruby-lang.org>
# You can redistribute it and/or modify it under the same term as Ruby.
# Revision:: $I... | Ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.