276件ヒット
  
    
      [1-100件を表示]
    
  
    (0.724秒)
  
  
    トップページ > 
:Kernel.#p
 > 
:exception
 > 
:timeout
 > 
:cpp_command
 > 
:public_instance_method
 > 
:method
 > 
:lambda
 > 
:JSON
 > 
:write
 > 
:English
  
モジュール
- Kernel (276)
 
キーワード
- 
        
$ ARGV (12)  - 
        
$ CHILD _ STATUS (12)  - 
        
$ DEFAULT _ INPUT (12)  - 
        
$ DEFAULT _ OUTPUT (12)  - 
        
$ ERROR _ INFO (12)  - 
        
$ ERROR _ POSITION (12)  - 
        
$ FIELD _ SEPARATOR (12)  - 
        
$ FS (12)  - 
        
$ INPUT _ LINE _ NUMBER (12)  - 
        
$ INPUT _ RECORD _ SEPARATOR (12)  - 
        
$ LAST _ MATCH _ INFO (12)  - 
        
$ LAST _ PAREN _ MATCH (12)  - 
        
$ LAST _ READ _ LINE (12)  - 
        
$ MATCH (12)  - 
        
$ NR (12)  - 
        
$ OFS (12)  - 
        
$ OUTPUT _ FIELD _ SEPARATOR (12)  - 
        
$ OUTPUT _ RECORD _ SEPARATOR (12)  - 
        
$ PID (12)  - 
        
$ POSTMATCH (12)  - 
        
$ PREMATCH (12)  - 
        
$ PROCESS _ ID (12)  - 
        
$ RS (12)  
検索結果
先頭5件
- 
      
Kernel
$ $ DEFAULT _ OUTPUT -> IO (27114.0)  - 
      
      
      
$> の別名
...$> の別名
require "English"
dout = $DEFAULT_OUTPUT.dup
$DEFAULT_OUTPUT.reopen("out.txt", "w")
print "foo"
$DEFAULT_OUTPUT.close
$DEFAULT_OUTPUT = dout
p "bar" # => bar
p File.read("out.txt") #=> foo... - 
      
Kernel
$ $ FIELD _ SEPARATOR -> String | nil (27114.0)  - 
      
      
      
$; の別名
...$; の別名
require "English"
str = "hoge,fuga,ugo,bar,foo"
p str.split #=> ["hoge,fuga,ugo,bar,foo"]
$FIELD_SEPARATOR = ","
p str.split #=> ["hoge", "fuga", "ugo", "bar", "foo"]... - 
      
Kernel
$ $ DEFAULT _ INPUT -> IO (27108.0)  - 
      
      
      
$< の別名
...$< の別名
require "English"
while line = $DEFAULT_INPUT.gets
p line
end
# end of sample.rb
ruby sample.rb < /etc/passwd
# => "hoge:x:500:501::/home/hoge:/bin/bash\n"
...... - 
      
Kernel
$ $ ERROR _ POSITION -> [String] | nil (27108.0)  - 
      
      
      
$@ の別名
...$@ の別名
require "English"
class SomethingError < StandardError; end
begin
raise SomethingError
rescue
p $ERROR_POSITION #=> ["sample.rb:5"]
end... - 
      
Kernel
$ $ INPUT _ LINE _ NUMBER -> Integer (27108.0)  - 
      
      
      
$. の別名
...$. の別名
1 e
2 f
3 g
4 h
5 i
# end of a.txt
require "English"
File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb
ruby sample.rb a.txt
#=> 5... - 
      
Kernel
$ $ INPUT _ RECORD _ SEPARATOR -> String | nil (27108.0)  - 
      
      
      
$/ の別名
...$/ の別名
require "English"
$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]
__END__
ugo|ego|fogo... - 
      
Kernel
$ $ LAST _ PAREN _ MATCH -> String | nil (27108.0)  - 
      
      
      
$+ の別名
..."English"
r1 = Regexp.compile("<img src=(http:.+?)>")
r2 = Regexp.compile("<a href=(http|ftp).+?>(.+?)</a>")
while line = DATA.gets
[ r1, r2 ].each {|rep|
rep =~ line
p $+
}
end
__END__
<tr> <td><img src=http://localhost/a.jpg></td> <td>ikkou</td> <td><a href=http:......//localhost/link.html>link</a></td> </tr>
#enf of sample.rb
$ ruby sample.rb
"http://localhost/a.jpg"
"link"... - 
      
Kernel
$ $ PID -> Integer (27108.0)  - 
      
      
      
$$ の別名
...$$ の別名
require "English"
p sprintf("something%s", $PID) #=> "something5543" など... - 
      
Kernel
$ $ POSTMATCH -> String | nil (27108.0)  - 
      
      
      
$' の別名
...$' の別名
require "English"
str = 'hoge,foo,bar,hee,hoo'
/foo/ =~ str
p $POSTMATCH #=> ",bar,hee,hoo"... 
