method
[]=
Ruby latest stable (v2_5_5)
-
0 notes -
Class: Object
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3 (0)
- What's this?
Related methods
- Class methods (4)
- json_create (<= v1_9_2_180)
- new (<= v1_8_7_330)
- version (<= v1_9_1_378)
- yaml_tag
- Instance methods (143)
- <=>
- =~
- == (<= v1_8_7_330)
- ===
- !~
- [] (>= v2_6_3)
- []= (>= v2_6_3)
- assert_Qundef
- check_signedness (<= v1_9_3_392)
- check_sizeof (<= v1_9_3_392)
- chmod
- class
- clone
- component (>= v2_6_3)
- convertible_int (<= v1_9_3_392)
- cp
- create_docfile (<= v1_9_2_180)
- create_header (<= v1_9_3_392)
- create_makefile (<= v1_9_3_392)
- create_win32ole_makefile (<= v1_9_2_180)
- CSV
- dclone
- default_handler (<= v1_9_2_180)
- default_src_encoding (<= v2_4_6)
- define_singleton_method
- DelegateClass
- depend_rules (<= v1_9_3_392)
- Digest
- dir_config (<= v1_9_3_392)
- display
- dummy_makefile (<= v1_9_3_392)
- dup
- element (>= v2_6_3)
- enable_config (<= v1_9_3_392)
- enum_for
- eql?
- equal? (<= v1_8_7_330)
- extend
- find_executable (<= v1_9_3_392)
- find_header (<= v1_9_3_392)
- find_library (<= v1_9_3_392)
- find_type (<= v1_9_3_392)
- freeze
- frozen?
- gemfile (>= v2_6_3)
- __getobj__
- hash (<= v2_4_6)
- have_const (<= v1_9_3_392)
- have_framework (<= v1_9_3_392)
- have_func (<= v1_9_3_392)
- have_header (<= v1_9_3_392)
- have_library (<= v1_9_3_392)
- have_macro (<= v1_9_3_392)
- have_struct_member (<= v1_9_3_392)
- have_type (<= v1_9_3_392)
- have_var (<= v1_9_3_392)
- help
- httpd
- id (<= v1_8_7_330)
- __id__ (<= v1_9_2_180)
- initialize_clone
- initialize_copy
- initialize_dup
- inspect
- install
- instance_eval (<= v1_8_7_330)
- instance_exec (<= v1_8_7_330)
- instance_of?
- instance_variable_defined?
- instance_variable_get
- instance_variables
- instance_variable_set
- is_a?
- itself
- kind_of?
- listup (<= v1_9_2_180)
- ln
- method
- methods
- mkdir
- mkmf
- mv
- namespace (>= v2_6_3)
- navigate (<= v1_9_2_180)
- nil?
- object_id
- pretty_print
- pretty_print_cycle
- private_methods
- protected_methods
- psych_to_yaml (<= v2_4_6)
- public_method
- public_methods
- public_send
- rake_namespace (>= v2_6_3)
- rawVALUE
- remove_instance_variable
- respond_to?
- respond_to_missing?
- rm
- rmdir
- send
- __send__ (<= v1_8_7_330)
- set_component (>= v2_6_3)
- set_element (>= v2_6_3)
- __setobj__
- setup
- singleton_class
- singleton_method
- singleton_method_added (<= v1_8_7_330)
- singleton_method_removed (<= v1_8_7_330)
- singleton_methods
- singleton_method_undefined (<= v1_8_7_330)
- stop_msg_loop (<= v1_9_2_180)
- stub (<= v2_1_10)
- sysread
- taint
- tainted?
- tap
- task (>= v2_6_3)
- then (>= v2_6_3)
- timeout
- to_a (<= v1_8_7_330)
- to_enum
- to_json (<= v1_9_2_180)
- to_s
- touch
- to_yaml
- to_yaml_properties (<= v2_4_6)
- to_yaml_style (<= v1_9_1_378)
- trust
- try_const (<= v1_9_3_392)
- try_type (<= v1_9_3_392)
- type (<= v1_8_7_330)
- unknown (<= v2_4_6)
- untaint
- untrust
- untrusted?
- validate_object
- wait_writable
- with_config (<= v1_9_3_392)
- xmp
- yield_self
= private
= protected
Method not available on this version
This method is only available on newer versions. The first available version of the method is shown here.
[]=(i, j, v)
public
Show source
# File lib/matrix.rb, line 312 def []=(i, j, v) raise FrozenError, "can't modify frozen Matrix" if frozen? rows = check_range(i, :row) or row = check_int(i, :row) columns = check_range(j, :column) or column = check_int(j, :column) if rows && columns set_row_and_col_range(rows, columns, v) elsif rows set_row_range(rows, column, v) elsif columns set_col_range(row, columns, v) else set_value(row, column, v) end end