426件ヒット
[101-200件を表示]
(0.070秒)
ライブラリ
- ビルトイン (378)
-
irb
/ context (12) -
irb
/ ext / history (24) - win32ole (12)
クラス
- BasicObject (48)
- Binding (70)
-
IRB
:: Context (36) - Module (96)
- Object (78)
- Proc (24)
-
RubyVM
:: InstructionSequence (24) - String (12)
- TracePoint (26)
-
WIN32OLE
_ TYPE (12)
キーワード
- binding (12)
-
class
_ eval (24) -
class
_ exec (12) -
default
_ event _ sources (12) -
define
_ method (24) - dump (12)
-
eval
_ history (12) -
eval
_ history= (12) -
eval
_ script (7) - evaluate (12)
-
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ variables (12) -
instruction
_ sequence (7) -
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) -
local
_ variables (11) - method (12)
-
module
_ eval (24) -
module
_ exec (12) - receiver (11)
-
respond
_ to? (12) - self (12)
- send (24)
-
singleton
_ method (12) -
singleton
_ method _ undefined (12) -
source
_ location (12) - taint (6)
-
to
_ a (12)
検索結果
先頭5件
-
IRB
:: Context # eval _ history=(val) (6114.0) -
実行結果の履歴の最大保存件数を val に設定します。
...実行結果の履歴の最大保存件数を val に設定します。
.irbrc ファイル中で IRB.conf[:EVAL_HISTORY] を設定する事でも同様の事が
行えます。
@param val 実行結果の履歴の最大保存件数を Integer か nil で指定し
ます。0 を指定......た場合は無制限に履歴を保存します。現在の値よ
りも小さい値を指定した場合は履歴がその件数に縮小されます。
nil を指定した場合は履歴の追加がこれ以上行われなくなります。
@see IRB::Context#eval_history... -
TracePoint
# eval _ script -> String | nil (6114.0) -
script_compiledイベント発生時にコンパイルされたソースコードを返します。 ファイルから読み込んだ場合は、nilを返します。
...ら読み込んだ場合は、nilを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.eval_script # => "puts 'hello'"
end.enable do
eval("puts 'hello'")
end
//}
@raise RuntimeError :script_compiled イベントのための
イベントフッ... -
IRB
:: Context # eval _ history -> Integer | nil (6108.0) -
実行結果の履歴の最大保存件数を Integer か nil で返します。
...履歴の最大保存件数を Integer か nil で返します。
@return 履歴の最大保存件数を Integer か nil で返します。0 を返し
た場合は無制限に保存します。nil を返した場合は追加の保存は行いません。
@see IRB::Context#eval_history=... -
IRB
:: Context # evaluate(line , line _ no) -> object (6101.0) -
ライブラリ内部で使用します。
ライブラリ内部で使用します。 -
Object
# taint -> self (25.0) -
このメソッドは Ruby 2.7 から deprecated で、Ruby 3.2 で削除予定です。
...[][ruby]{
$SAFE = 1
some = "puts '@&%&(#!'"
p some.tainted? #=> false
eval(some) #=> @&%&(#!
some.taint
p some.tainted? #=> true
eval(some) # Insecure operation - eval (SecurityError)
some.untaint
p some.tainted? #=> false
eval(some) #=> @&%&(#!
p ENV['OS'].tainted? #=> true
//}
@see Object#tai... -
String
# dump -> String (17.0) -
文字列中の非表示文字をバックスラッシュ記法に置き換えた文字列を返します。 str == eval(str.dump) となることが保証されています。
...文字列中の非表示文字をバックスラッシュ記法に置き換えた文字列を返します。
str == eval(str.dump) となることが保証されています。
//emlist[例][ruby]{
# p だとさらにバックスラッシュが増えて見にくいので puts している
puts "ab... -
Module
# class _ exec(*args) {|*vars| . . . } -> object (13.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...ing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}
t = Thing.new
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}
@see Module#module_eval, Module#class_eval... -
Module
# module _ exec(*args) {|*vars| . . . } -> object (13.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...ing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}
t = Thing.new
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}
@see Module#module_eval, Module#class_eval... -
Proc
# source _ location -> [String , Integer] | nil (13.0) -
ソースコードのファイル名と行番号を配列で返します。
...by]{
# /path/to/target.rb を実行
proc {}.source_location # => ["/path/to/target.rb", 1]
proc {}.source_location # => ["/path/to/target.rb", 2]
(eval "proc {}").source_location # => ["(eval)", 1]
method(:p).to_proc.source_location # => nil
//}
@see Method#source_location... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (13.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...ist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval("puts 'hello'")
end
//}
@raise RuntimeError :script_compiled イベントのための
イベントフックの外...